clear-skies-gitlab 2.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- clear_skies_gitlab-2.0.1.dist-info/METADATA +75 -0
- clear_skies_gitlab-2.0.1.dist-info/RECORD +42 -0
- clear_skies_gitlab-2.0.1.dist-info/WHEEL +4 -0
- clear_skies_gitlab-2.0.1.dist-info/licenses/LICENSE +21 -0
- clearskies_gitlab/__init__.py +3 -0
- clearskies_gitlab/backends/__init__.py +9 -0
- clearskies_gitlab/backends/gitlab_rest_backend.py +150 -0
- clearskies_gitlab/defaults/__init__.py +7 -0
- clearskies_gitlab/defaults/gitlab_default_auth.py +7 -0
- clearskies_gitlab/defaults/gitlab_default_url.py +7 -0
- clearskies_gitlab/exceptions/__init__.py +13 -0
- clearskies_gitlab/exceptions/gitlab_error.py +50 -0
- clearskies_gitlab/models/__init__.py +19 -0
- clearskies_gitlab/models/gitlab_cicd_variable.py +23 -0
- clearskies_gitlab/models/gitlab_gql_model.py +9 -0
- clearskies_gitlab/models/gitlab_group.py +69 -0
- clearskies_gitlab/models/gitlab_member.py +24 -0
- clearskies_gitlab/models/gitlab_namespace.py +32 -0
- clearskies_gitlab/models/gitlab_project.py +110 -0
- clearskies_gitlab/models/gitlab_rest_model.py +11 -0
- clearskies_gitlab/models/rest/__init__.py +35 -0
- clearskies_gitlab/models/rest/gitlab_rest_advanced_search.py +38 -0
- clearskies_gitlab/models/rest/gitlab_rest_advanced_search_blob.py +26 -0
- clearskies_gitlab/models/rest/gitlab_rest_current_user.py +43 -0
- clearskies_gitlab/models/rest/gitlab_rest_group.py +75 -0
- clearskies_gitlab/models/rest/gitlab_rest_group_access_token.py +32 -0
- clearskies_gitlab/models/rest/gitlab_rest_group_member.py +28 -0
- clearskies_gitlab/models/rest/gitlab_rest_group_member_reference.py +6 -0
- clearskies_gitlab/models/rest/gitlab_rest_group_project.py +37 -0
- clearskies_gitlab/models/rest/gitlab_rest_group_reference.py +6 -0
- clearskies_gitlab/models/rest/gitlab_rest_group_search.py +21 -0
- clearskies_gitlab/models/rest/gitlab_rest_group_search_blob.py +13 -0
- clearskies_gitlab/models/rest/gitlab_rest_group_subgroup.py +65 -0
- clearskies_gitlab/models/rest/gitlab_rest_group_subgroup_reference.py +6 -0
- clearskies_gitlab/models/rest/gitlab_rest_group_variable.py +22 -0
- clearskies_gitlab/models/rest/gitlab_rest_namespace.py +69 -0
- clearskies_gitlab/models/rest/gitlab_rest_project.py +81 -0
- clearskies_gitlab/models/rest/gitlab_rest_project_reference.py +6 -0
- clearskies_gitlab/models/rest/gitlab_rest_project_repository_commit.py +44 -0
- clearskies_gitlab/models/rest/gitlab_rest_project_repository_commit_diff.py +34 -0
- clearskies_gitlab/models/rest/gitlab_rest_project_variable.py +24 -0
- clearskies_gitlab/models/rest/gitlab_rest_project_variable_refence.py +6 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections import OrderedDict
|
|
4
|
+
from typing import Any, Self
|
|
5
|
+
|
|
6
|
+
from clearskies.columns import BelongsToId, BelongsToModel, Boolean, Datetime, HasMany, Integer, Json, Select, String
|
|
7
|
+
|
|
8
|
+
from clearskies_gitlab.backends.gitlab_rest_backend import GitlabRestBackend
|
|
9
|
+
from clearskies_gitlab.models import gitlab_project, gitlab_rest_model
|
|
10
|
+
from clearskies_gitlab.models.rest import (
|
|
11
|
+
gitlab_rest_group_reference,
|
|
12
|
+
gitlab_rest_namespace,
|
|
13
|
+
gitlab_rest_project_variable_refence,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class GitlabRestProject(
|
|
18
|
+
gitlab_rest_model.GitlabRestModel,
|
|
19
|
+
gitlab_project.GitlabProject,
|
|
20
|
+
):
|
|
21
|
+
"""Model for projects."""
|
|
22
|
+
|
|
23
|
+
backend = GitlabRestBackend(
|
|
24
|
+
api_to_model_map={
|
|
25
|
+
"namespace.id": ["namespace_id", "group_id"],
|
|
26
|
+
}
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
@classmethod
|
|
30
|
+
def destination_name(cls: type[Self]) -> str:
|
|
31
|
+
"""Return the slug of the api endpoint for this model."""
|
|
32
|
+
return "projects"
|
|
33
|
+
|
|
34
|
+
group_id = BelongsToId(gitlab_rest_group_reference.GitlabRestGroupReference)
|
|
35
|
+
group = BelongsToModel("group_id")
|
|
36
|
+
|
|
37
|
+
namespace_id = BelongsToId(gitlab_rest_namespace.GitlabRestNamespace)
|
|
38
|
+
namespace = BelongsToModel("namespace_id")
|
|
39
|
+
|
|
40
|
+
variables = HasMany(
|
|
41
|
+
gitlab_rest_project_variable_refence.GitlabRestProjectVariableReference,
|
|
42
|
+
foreign_column_name="project_id",
|
|
43
|
+
)
|
|
44
|
+
### Search params
|
|
45
|
+
include_hidden = Boolean()
|
|
46
|
+
include_pending_delete = Boolean()
|
|
47
|
+
last_activity_after = Datetime()
|
|
48
|
+
last_activity_before = Datetime()
|
|
49
|
+
membership = Boolean()
|
|
50
|
+
min_access_level = Integer()
|
|
51
|
+
order_by = Select(
|
|
52
|
+
allowed_values=[
|
|
53
|
+
"id",
|
|
54
|
+
"name",
|
|
55
|
+
"path",
|
|
56
|
+
"created_at",
|
|
57
|
+
"updated_at",
|
|
58
|
+
"star_count",
|
|
59
|
+
"last_activity_at",
|
|
60
|
+
"similarity",
|
|
61
|
+
]
|
|
62
|
+
)
|
|
63
|
+
owned = Boolean()
|
|
64
|
+
repository_checksum_failed = Boolean()
|
|
65
|
+
repository_storage = String()
|
|
66
|
+
search_namespaces = Boolean()
|
|
67
|
+
search = String()
|
|
68
|
+
simple = Boolean()
|
|
69
|
+
sort = String()
|
|
70
|
+
starred = Boolean()
|
|
71
|
+
topic_id = Integer()
|
|
72
|
+
topic = String()
|
|
73
|
+
updated_after = Datetime()
|
|
74
|
+
updated_before = Datetime()
|
|
75
|
+
visibility = Select(allowed_values=["public", "internal", "private"])
|
|
76
|
+
wiki_checksum_failed = Boolean()
|
|
77
|
+
with_custom_attributes = Boolean()
|
|
78
|
+
with_issues_enabled = Boolean()
|
|
79
|
+
with_merge_requests_enabled = Boolean()
|
|
80
|
+
with_programming_language = String()
|
|
81
|
+
marked_for_deletion_on = Datetime(date_format="%Y-%m-%d")
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections import OrderedDict
|
|
4
|
+
from typing import Any, Self
|
|
5
|
+
|
|
6
|
+
from clearskies.columns import Boolean, Datetime, Email, Integer, Json, String
|
|
7
|
+
|
|
8
|
+
from clearskies_gitlab.models import gitlab_rest_model
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class GitlabRestProjectRepositoryCommit(
|
|
12
|
+
gitlab_rest_model.GitlabRestModel,
|
|
13
|
+
):
|
|
14
|
+
"""Model for projects repository commits."""
|
|
15
|
+
|
|
16
|
+
@classmethod
|
|
17
|
+
def destination_name(cls: type[Self]) -> str:
|
|
18
|
+
"""Return the slug of the api endpoint for this model."""
|
|
19
|
+
return "projects/:project_id/repository/commits"
|
|
20
|
+
|
|
21
|
+
id = String()
|
|
22
|
+
short_id = String()
|
|
23
|
+
title = String()
|
|
24
|
+
author_name = String()
|
|
25
|
+
author_email = Email()
|
|
26
|
+
authored_date = Datetime()
|
|
27
|
+
committer_name = String()
|
|
28
|
+
committer_email = Email()
|
|
29
|
+
committed_date = Datetime()
|
|
30
|
+
created_at = Datetime()
|
|
31
|
+
messsage = String()
|
|
32
|
+
parent_ids = Json()
|
|
33
|
+
web_url = String()
|
|
34
|
+
extended_trailers = Json()
|
|
35
|
+
# search params
|
|
36
|
+
project_id = Integer()
|
|
37
|
+
ref_name = String()
|
|
38
|
+
since = Datetime()
|
|
39
|
+
until = Datetime()
|
|
40
|
+
path = String()
|
|
41
|
+
all = Boolean()
|
|
42
|
+
with_stats = Boolean()
|
|
43
|
+
first_parent = Boolean()
|
|
44
|
+
trailers = Boolean()
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections import OrderedDict
|
|
4
|
+
from typing import Any, Self
|
|
5
|
+
|
|
6
|
+
from clearskies.columns import Boolean, Integer, String
|
|
7
|
+
|
|
8
|
+
from clearskies_gitlab.models import gitlab_rest_model
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class GitlabRestProjectRepositoryCommitDiff(
|
|
12
|
+
gitlab_rest_model.GitlabRestModel,
|
|
13
|
+
):
|
|
14
|
+
"""Model for projects repository commits diff."""
|
|
15
|
+
|
|
16
|
+
id_column_name = "commit_id"
|
|
17
|
+
|
|
18
|
+
@classmethod
|
|
19
|
+
def destination_name(cls: type[Self]) -> str:
|
|
20
|
+
"""Return the slug of the api endpoint for this model."""
|
|
21
|
+
return "projects/:project_id/repository/commits/:commit_id/diff"
|
|
22
|
+
|
|
23
|
+
diff = String()
|
|
24
|
+
new_path = String()
|
|
25
|
+
old_path = String()
|
|
26
|
+
a_mode = Integer()
|
|
27
|
+
b_mode = Integer()
|
|
28
|
+
new_file = Boolean()
|
|
29
|
+
renamed_file = Boolean()
|
|
30
|
+
deleted_file = Boolean()
|
|
31
|
+
# search params
|
|
32
|
+
project_id = Integer()
|
|
33
|
+
commit_id = String()
|
|
34
|
+
unidiff = Boolean()
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections import OrderedDict
|
|
4
|
+
from typing import Any, Self
|
|
5
|
+
|
|
6
|
+
from clearskies.columns import BelongsToId, BelongsToModel
|
|
7
|
+
|
|
8
|
+
from clearskies_gitlab.models import gitlab_cicd_variable, gitlab_rest_model
|
|
9
|
+
from clearskies_gitlab.models.rest import gitlab_rest_project_reference
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class GitlabRestProjectVariable(
|
|
13
|
+
gitlab_rest_model.GitlabRestModel,
|
|
14
|
+
gitlab_cicd_variable.GitlabCICDVariable,
|
|
15
|
+
):
|
|
16
|
+
"""Model for gitlab group variables."""
|
|
17
|
+
|
|
18
|
+
@classmethod
|
|
19
|
+
def destination_name(cls: type[Self]) -> str:
|
|
20
|
+
"""Return the slug of the api endpoint for this model."""
|
|
21
|
+
return "projects/:project_id/variables"
|
|
22
|
+
|
|
23
|
+
project_id = BelongsToId(gitlab_rest_project_reference.GitlabRestProjectReference)
|
|
24
|
+
project = BelongsToModel("project_id")
|