clear-skies-gitlab 2.0.1__py3-none-any.whl → 2.0.3__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 → clear_skies_gitlab-2.0.3.dist-info}/METADATA +2 -2
- clear_skies_gitlab-2.0.3.dist-info/RECORD +68 -0
- {clear_skies_gitlab-2.0.1.dist-info → clear_skies_gitlab-2.0.3.dist-info}/WHEEL +1 -1
- {clear_skies_gitlab-2.0.1.dist-info → clear_skies_gitlab-2.0.3.dist-info}/licenses/LICENSE +1 -1
- clearskies_gitlab/__init__.py +2 -2
- clearskies_gitlab/defaults/__init__.py +4 -2
- clearskies_gitlab/defaults/gitlab_default_auth.py +3 -0
- clearskies_gitlab/defaults/gitlab_default_host.py +10 -0
- clearskies_gitlab/defaults/gitlab_graphql_client.py +18 -0
- clearskies_gitlab/exceptions/gitlab_error.py +1 -0
- clearskies_gitlab/graphql/__init__.py +3 -0
- clearskies_gitlab/graphql/backends/__init__.py +7 -0
- clearskies_gitlab/graphql/backends/gitlab_graphql_backend.py +38 -0
- clearskies_gitlab/graphql/models/__init__.py +13 -0
- clearskies_gitlab/graphql/models/gitlab_container_repository.py +34 -0
- clearskies_gitlab/graphql/models/gitlab_container_repository_reference.py +8 -0
- clearskies_gitlab/graphql/models/gitlab_container_repository_tag.py +32 -0
- clearskies_gitlab/graphql/models/gitlab_container_repository_tag_reference.py +8 -0
- clearskies_gitlab/graphql/models/gitlab_group.py +24 -0
- clearskies_gitlab/graphql/models/gitlab_group_reference.py +8 -0
- clearskies_gitlab/graphql/models/gitlab_project.py +25 -0
- clearskies_gitlab/graphql/models/gitlab_project_reference.py +8 -0
- clearskies_gitlab/rest/__init__.py +12 -0
- clearskies_gitlab/rest/backends/__init__.py +3 -0
- clearskies_gitlab/{backends → rest/backends}/gitlab_rest_backend.py +17 -12
- clearskies_gitlab/rest/gitlab_branch_rule.py +21 -0
- clearskies_gitlab/{models → rest}/gitlab_cicd_variable.py +0 -3
- clearskies_gitlab/{models → rest}/gitlab_member.py +0 -3
- clearskies_gitlab/rest/models/__init__.py +49 -0
- clearskies_gitlab/{models/rest → rest/models}/gitlab_rest_advanced_search.py +7 -7
- clearskies_gitlab/{models/rest → rest/models}/gitlab_rest_advanced_search_blob.py +1 -4
- clearskies_gitlab/{models/rest → rest/models}/gitlab_rest_current_user.py +7 -4
- clearskies_gitlab/rest/models/gitlab_rest_group.py +48 -0
- clearskies_gitlab/{models/rest → rest/models}/gitlab_rest_group_access_token.py +8 -6
- clearskies_gitlab/rest/models/gitlab_rest_group_access_token_reference.py +8 -0
- clearskies_gitlab/{models/gitlab_group.py → rest/models/gitlab_rest_group_base.py} +40 -5
- clearskies_gitlab/{models/rest → rest/models}/gitlab_rest_group_member.py +7 -6
- clearskies_gitlab/rest/models/gitlab_rest_group_member_reference.py +8 -0
- clearskies_gitlab/rest/models/gitlab_rest_group_project.py +16 -0
- clearskies_gitlab/rest/models/gitlab_rest_group_project_reference.py +8 -0
- clearskies_gitlab/rest/models/gitlab_rest_group_reference.py +9 -0
- clearskies_gitlab/{models/rest → rest/models}/gitlab_rest_group_search.py +2 -3
- clearskies_gitlab/{models/rest → rest/models}/gitlab_rest_group_search_blob.py +1 -1
- clearskies_gitlab/rest/models/gitlab_rest_group_subgroup.py +63 -0
- clearskies_gitlab/rest/models/gitlab_rest_group_subgroup_reference.py +8 -0
- clearskies_gitlab/{models/rest → rest/models}/gitlab_rest_group_variable.py +7 -5
- clearskies_gitlab/rest/models/gitlab_rest_group_variable_reference.py +8 -0
- clearskies_gitlab/{models/rest → rest/models}/gitlab_rest_namespace.py +28 -9
- clearskies_gitlab/{models/gitlab_project.py → rest/models/gitlab_rest_project.py} +129 -36
- clearskies_gitlab/rest/models/gitlab_rest_project_approval_config.py +34 -0
- clearskies_gitlab/rest/models/gitlab_rest_project_approval_config_reference.py +8 -0
- clearskies_gitlab/rest/models/gitlab_rest_project_approval_rule.py +42 -0
- clearskies_gitlab/rest/models/gitlab_rest_project_approval_rule_reference.py +8 -0
- clearskies_gitlab/rest/models/gitlab_rest_project_member.py +29 -0
- clearskies_gitlab/rest/models/gitlab_rest_project_member_reference.py +8 -0
- clearskies_gitlab/rest/models/gitlab_rest_project_protected_branch.py +35 -0
- clearskies_gitlab/rest/models/gitlab_rest_project_protected_branch_reference.py +8 -0
- clearskies_gitlab/rest/models/gitlab_rest_project_reference.py +9 -0
- clearskies_gitlab/{models/rest → rest/models}/gitlab_rest_project_repository_commit.py +15 -5
- clearskies_gitlab/{models/rest → rest/models}/gitlab_rest_project_repository_commit_diff.py +6 -4
- clearskies_gitlab/rest/models/gitlab_rest_project_repository_contributor.py +34 -0
- clearskies_gitlab/rest/models/gitlab_rest_project_repository_contributor_reference.py +8 -0
- clearskies_gitlab/rest/models/gitlab_rest_project_repository_file.py +39 -0
- clearskies_gitlab/rest/models/gitlab_rest_project_repository_file_raw.py +31 -0
- clearskies_gitlab/rest/models/gitlab_rest_project_repository_file_reference.py +8 -0
- clearskies_gitlab/{models/rest → rest/models}/gitlab_rest_project_variable.py +7 -5
- clearskies_gitlab/rest/models/gitlab_rest_project_variable_reference.py +8 -0
- clear_skies_gitlab-2.0.1.dist-info/RECORD +0 -42
- clearskies_gitlab/backends/__init__.py +0 -9
- clearskies_gitlab/defaults/gitlab_default_url.py +0 -7
- clearskies_gitlab/models/__init__.py +0 -19
- clearskies_gitlab/models/gitlab_gql_model.py +0 -9
- clearskies_gitlab/models/gitlab_namespace.py +0 -32
- clearskies_gitlab/models/gitlab_rest_model.py +0 -11
- clearskies_gitlab/models/rest/__init__.py +0 -35
- clearskies_gitlab/models/rest/gitlab_rest_group.py +0 -75
- clearskies_gitlab/models/rest/gitlab_rest_group_member_reference.py +0 -6
- clearskies_gitlab/models/rest/gitlab_rest_group_project.py +0 -37
- clearskies_gitlab/models/rest/gitlab_rest_group_reference.py +0 -6
- clearskies_gitlab/models/rest/gitlab_rest_group_subgroup.py +0 -65
- clearskies_gitlab/models/rest/gitlab_rest_group_subgroup_reference.py +0 -6
- clearskies_gitlab/models/rest/gitlab_rest_project.py +0 -81
- clearskies_gitlab/models/rest/gitlab_rest_project_reference.py +0 -6
- clearskies_gitlab/models/rest/gitlab_rest_project_variable_refence.py +0 -6
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Self
|
|
4
|
+
|
|
5
|
+
from clearskies import Model
|
|
6
|
+
from clearskies.columns import BelongsToId, BelongsToModel, Boolean
|
|
7
|
+
|
|
8
|
+
from clearskies_gitlab.rest.backends import GitlabRestBackend
|
|
9
|
+
from clearskies_gitlab.rest.models import gitlab_rest_project_reference
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class GitlabRestProjectApprovalConfig(
|
|
13
|
+
Model,
|
|
14
|
+
):
|
|
15
|
+
"""Model for gitlab project protected branches."""
|
|
16
|
+
|
|
17
|
+
backend = GitlabRestBackend()
|
|
18
|
+
|
|
19
|
+
@classmethod
|
|
20
|
+
def destination_name(cls: type[Self]) -> str:
|
|
21
|
+
"""Return the slug of the api endpoint for this model."""
|
|
22
|
+
return "projects/:project_id/approvals"
|
|
23
|
+
|
|
24
|
+
project_id = BelongsToId(gitlab_rest_project_reference.GitlabRestProjectReference)
|
|
25
|
+
project = BelongsToModel("project_id")
|
|
26
|
+
|
|
27
|
+
id_column_name = "project_id"
|
|
28
|
+
|
|
29
|
+
reset_approvals_on_push = Boolean()
|
|
30
|
+
require_user_password_for_approval = Boolean()
|
|
31
|
+
disable_overriding_approvers_per_merge_request = Boolean()
|
|
32
|
+
merge_requests_author_approval = Boolean()
|
|
33
|
+
merge_requests_disable_committers_approval = Boolean()
|
|
34
|
+
require_reauthentication_to_approve = Boolean()
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
class GitlabRestProjectApprovalConfigReference:
|
|
2
|
+
"""Reference to GitlabRestProjectApprovalConfig model."""
|
|
3
|
+
|
|
4
|
+
def get_model_class(self) -> type:
|
|
5
|
+
"""Return the model class this reference points to."""
|
|
6
|
+
from clearskies_gitlab.rest.models import gitlab_rest_project_approval_config
|
|
7
|
+
|
|
8
|
+
return gitlab_rest_project_approval_config.GitlabRestProjectApprovalConfig
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, Self
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from builtins import type as builtins_type
|
|
7
|
+
|
|
8
|
+
from clearskies import Model
|
|
9
|
+
from clearskies.columns import BelongsToId, BelongsToModel, Boolean, Integer, Json, Select, String
|
|
10
|
+
|
|
11
|
+
from clearskies_gitlab.rest.backends import GitlabRestBackend
|
|
12
|
+
from clearskies_gitlab.rest.models import gitlab_rest_project_reference
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class GitlabRestProjectApprovalRule(
|
|
16
|
+
Model,
|
|
17
|
+
):
|
|
18
|
+
"""Model for gitlab project protected branches."""
|
|
19
|
+
|
|
20
|
+
backend = GitlabRestBackend()
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
def destination_name(cls: builtins_type[Self]) -> str:
|
|
24
|
+
"""Return the slug of the api endpoint for this model."""
|
|
25
|
+
return "projects/:project_id/approval_rules"
|
|
26
|
+
|
|
27
|
+
id_column_name = "id"
|
|
28
|
+
|
|
29
|
+
name = String()
|
|
30
|
+
id = Integer()
|
|
31
|
+
type = Select(allowed_values=["regular", "code_owner", "report_approver"])
|
|
32
|
+
approvals_required = Integer()
|
|
33
|
+
applies_to_all_protected_branches = Boolean()
|
|
34
|
+
|
|
35
|
+
project_id = BelongsToId(gitlab_rest_project_reference.GitlabRestProjectReference)
|
|
36
|
+
project = BelongsToModel("project_id")
|
|
37
|
+
|
|
38
|
+
eligible_approvers = Json()
|
|
39
|
+
users = Json()
|
|
40
|
+
groups = Json()
|
|
41
|
+
protected_branches = Json()
|
|
42
|
+
contains_hidden_groups = Boolean()
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
class GitlabRestProjectApprovalRuleReference:
|
|
2
|
+
"""Reference to GitlabRestProjectApprovalRule model."""
|
|
3
|
+
|
|
4
|
+
def get_model_class(self) -> type:
|
|
5
|
+
"""Return the model class this reference points to."""
|
|
6
|
+
from clearskies_gitlab.rest.models import gitlab_rest_project_approval_rule
|
|
7
|
+
|
|
8
|
+
return gitlab_rest_project_approval_rule.GitlabRestProjectApprovalRule
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Self
|
|
4
|
+
|
|
5
|
+
from clearskies.columns import Boolean, Json, String
|
|
6
|
+
|
|
7
|
+
from clearskies_gitlab.rest import gitlab_member
|
|
8
|
+
from clearskies_gitlab.rest.backends import GitlabRestBackend
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class GitlabRestProjectMember(
|
|
12
|
+
gitlab_member.GitlabMember,
|
|
13
|
+
):
|
|
14
|
+
"""Model for project members."""
|
|
15
|
+
|
|
16
|
+
backend = GitlabRestBackend()
|
|
17
|
+
id_column_name = "id"
|
|
18
|
+
|
|
19
|
+
@classmethod
|
|
20
|
+
def destination_name(cls: type[Self]) -> str:
|
|
21
|
+
"""Return the slug of the api endpoint for this model."""
|
|
22
|
+
return "projects/:project_id/members"
|
|
23
|
+
|
|
24
|
+
project_id = String()
|
|
25
|
+
query = String()
|
|
26
|
+
user_ids = Json()
|
|
27
|
+
skip_users = Json()
|
|
28
|
+
show_seat_info = Boolean()
|
|
29
|
+
all = Boolean()
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
class GitlabRestProjectMemberReference:
|
|
2
|
+
"""Reference to GitlabRestProjectMember model."""
|
|
3
|
+
|
|
4
|
+
def get_model_class(self) -> type:
|
|
5
|
+
"""Return the model class this reference points to."""
|
|
6
|
+
from clearskies_gitlab.rest.models import gitlab_rest_project_member
|
|
7
|
+
|
|
8
|
+
return gitlab_rest_project_member.GitlabRestProjectMember
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Self
|
|
4
|
+
|
|
5
|
+
from clearskies import Model
|
|
6
|
+
from clearskies.columns import BelongsToId, BelongsToModel, Boolean, Integer, Json, String
|
|
7
|
+
|
|
8
|
+
from clearskies_gitlab.rest.backends import GitlabRestBackend
|
|
9
|
+
from clearskies_gitlab.rest.models import gitlab_rest_project_reference
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class GitlabRestProjectProtectedBranch(
|
|
13
|
+
Model,
|
|
14
|
+
):
|
|
15
|
+
"""Model for gitlab project protected branches."""
|
|
16
|
+
|
|
17
|
+
@classmethod
|
|
18
|
+
def destination_name(cls: type[Self]) -> str:
|
|
19
|
+
"""Return the slug of the api endpoint for this model."""
|
|
20
|
+
return "projects/:project_id/protected_branches"
|
|
21
|
+
|
|
22
|
+
id_column_name = "id"
|
|
23
|
+
|
|
24
|
+
backend = GitlabRestBackend()
|
|
25
|
+
|
|
26
|
+
id = Integer()
|
|
27
|
+
name = String()
|
|
28
|
+
allow_force_push = Boolean()
|
|
29
|
+
code_owner_approval_required = Boolean()
|
|
30
|
+
merge_access_levels = Json()
|
|
31
|
+
push_access_levels = Json()
|
|
32
|
+
unprotect_access_levels = Json()
|
|
33
|
+
|
|
34
|
+
project_id = BelongsToId(gitlab_rest_project_reference.GitlabRestProjectReference)
|
|
35
|
+
project = BelongsToModel("project_id")
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
class GitlabRestProjectProtectedBranchReference:
|
|
2
|
+
"""Reference to GitlabRestProjectProtectedBranch model."""
|
|
3
|
+
|
|
4
|
+
def get_model_class(self) -> type:
|
|
5
|
+
"""Return the model class this reference points to."""
|
|
6
|
+
from clearskies_gitlab.rest.models import gitlab_rest_project_protected_branch
|
|
7
|
+
|
|
8
|
+
return gitlab_rest_project_protected_branch.GitlabRestProjectProtectedBranch
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from clearskies_gitlab.rest.models import gitlab_rest_project
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class GitlabRestProjectReference:
|
|
5
|
+
"""Reference to GitlabRestProject model."""
|
|
6
|
+
|
|
7
|
+
def get_model_class(self) -> type:
|
|
8
|
+
"""Return the model class this reference points to."""
|
|
9
|
+
return gitlab_rest_project.GitlabRestProject
|
|
@@ -1,23 +1,33 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from
|
|
4
|
-
from typing import Any, Self
|
|
3
|
+
from typing import Self
|
|
5
4
|
|
|
6
|
-
from clearskies
|
|
5
|
+
from clearskies import Model
|
|
6
|
+
from clearskies.columns import Boolean, Datetime, Email, HasOne, Integer, Json, String
|
|
7
7
|
|
|
8
|
-
from clearskies_gitlab.
|
|
8
|
+
from clearskies_gitlab.rest.backends import GitlabRestBackend
|
|
9
|
+
from clearskies_gitlab.rest.models import gitlab_rest_project_repository_commit_diff
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
class GitlabRestProjectRepositoryCommit(
|
|
12
|
-
|
|
13
|
+
Model,
|
|
13
14
|
):
|
|
14
15
|
"""Model for projects repository commits."""
|
|
15
16
|
|
|
17
|
+
backend = GitlabRestBackend()
|
|
18
|
+
id_column_name = "id"
|
|
19
|
+
|
|
16
20
|
@classmethod
|
|
17
21
|
def destination_name(cls: type[Self]) -> str:
|
|
18
22
|
"""Return the slug of the api endpoint for this model."""
|
|
19
23
|
return "projects/:project_id/repository/commits"
|
|
20
24
|
|
|
25
|
+
diff = HasOne(
|
|
26
|
+
gitlab_rest_project_repository_commit_diff.GitlabRestProjectRepositoryCommitDiff,
|
|
27
|
+
foreign_column_name="commit_id",
|
|
28
|
+
where=lambda model, parent: model.where(f"gitlab_project_id={parent.id}"),
|
|
29
|
+
)
|
|
30
|
+
|
|
21
31
|
id = String()
|
|
22
32
|
short_id = String()
|
|
23
33
|
title = String()
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from
|
|
4
|
-
from typing import Any, Self
|
|
3
|
+
from typing import Self
|
|
5
4
|
|
|
5
|
+
from clearskies import Model
|
|
6
6
|
from clearskies.columns import Boolean, Integer, String
|
|
7
7
|
|
|
8
|
-
from clearskies_gitlab.
|
|
8
|
+
from clearskies_gitlab.rest.backends import GitlabRestBackend
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class GitlabRestProjectRepositoryCommitDiff(
|
|
12
|
-
|
|
12
|
+
Model,
|
|
13
13
|
):
|
|
14
14
|
"""Model for projects repository commits diff."""
|
|
15
15
|
|
|
16
16
|
id_column_name = "commit_id"
|
|
17
17
|
|
|
18
|
+
backend = GitlabRestBackend()
|
|
19
|
+
|
|
18
20
|
@classmethod
|
|
19
21
|
def destination_name(cls: type[Self]) -> str:
|
|
20
22
|
"""Return the slug of the api endpoint for this model."""
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Self
|
|
4
|
+
|
|
5
|
+
from clearskies import Model
|
|
6
|
+
from clearskies.columns import BelongsToId, BelongsToModel, Email, Integer, String
|
|
7
|
+
|
|
8
|
+
from clearskies_gitlab.rest.backends import GitlabRestBackend
|
|
9
|
+
from clearskies_gitlab.rest.models import gitlab_rest_project_reference
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class GitlabRestProjectRepositoryContributor(
|
|
13
|
+
Model,
|
|
14
|
+
):
|
|
15
|
+
"""Model for projects repository contributors."""
|
|
16
|
+
|
|
17
|
+
id_column_name = "email"
|
|
18
|
+
|
|
19
|
+
backend = GitlabRestBackend()
|
|
20
|
+
|
|
21
|
+
@classmethod
|
|
22
|
+
def destination_name(cls: type[Self]) -> str:
|
|
23
|
+
"""Return the slug of the api endpoint for this model."""
|
|
24
|
+
return "projects/:project_id/repository/contributors"
|
|
25
|
+
|
|
26
|
+
name = String()
|
|
27
|
+
email = Email()
|
|
28
|
+
commits = Integer()
|
|
29
|
+
additions = Integer()
|
|
30
|
+
deletions = Integer()
|
|
31
|
+
# search params
|
|
32
|
+
project_id = BelongsToId(gitlab_rest_project_reference.GitlabRestProjectReference)
|
|
33
|
+
project = BelongsToModel("project_id")
|
|
34
|
+
ref = String()
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
class GitlabRestProjectRepositoryContributorReference:
|
|
2
|
+
"""Reference to GitlabRestProjectRepositoryContributor model."""
|
|
3
|
+
|
|
4
|
+
def get_model_class(self) -> type:
|
|
5
|
+
"""Return the model class this reference points to."""
|
|
6
|
+
from clearskies_gitlab.rest.models import gitlab_rest_project_repository_contributor
|
|
7
|
+
|
|
8
|
+
return gitlab_rest_project_repository_contributor.GitlabRestProjectRepositoryContributor
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Self
|
|
4
|
+
|
|
5
|
+
from clearskies import Model
|
|
6
|
+
from clearskies.columns import BelongsToId, BelongsToModel, Boolean, Integer, String
|
|
7
|
+
|
|
8
|
+
from clearskies_gitlab.rest.backends import GitlabRestBackend
|
|
9
|
+
from clearskies_gitlab.rest.models import gitlab_rest_project_reference
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class GitlabRestProjectRepositoryFile(
|
|
13
|
+
Model,
|
|
14
|
+
):
|
|
15
|
+
"""Model for projects repository commits diff."""
|
|
16
|
+
|
|
17
|
+
id_column_name = "file_path"
|
|
18
|
+
|
|
19
|
+
backend = GitlabRestBackend()
|
|
20
|
+
|
|
21
|
+
@classmethod
|
|
22
|
+
def destination_name(cls: type[Self]) -> str:
|
|
23
|
+
"""Return the slug of the api endpoint for this model."""
|
|
24
|
+
return "projects/:project_id/repository/files/:file_path"
|
|
25
|
+
|
|
26
|
+
project_id = BelongsToId(gitlab_rest_project_reference.GitlabRestProjectReference)
|
|
27
|
+
project = BelongsToModel("project_id")
|
|
28
|
+
|
|
29
|
+
file_path = String()
|
|
30
|
+
ref = String(default="HEAD")
|
|
31
|
+
blob_id = String()
|
|
32
|
+
commit_id = String()
|
|
33
|
+
content = String()
|
|
34
|
+
content_sha256 = String()
|
|
35
|
+
encoding = String()
|
|
36
|
+
execute_filemode = Boolean()
|
|
37
|
+
file_name = String()
|
|
38
|
+
last_commit_id = String()
|
|
39
|
+
size = Integer()
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Self
|
|
4
|
+
|
|
5
|
+
from clearskies import Model
|
|
6
|
+
from clearskies.columns import BelongsToId, BelongsToModel, Boolean, String
|
|
7
|
+
|
|
8
|
+
from clearskies_gitlab.rest.backends import GitlabRestBackend
|
|
9
|
+
from clearskies_gitlab.rest.models import gitlab_rest_project_reference
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class GitlabRestProjectRepositoryCommitDiff(
|
|
13
|
+
Model,
|
|
14
|
+
):
|
|
15
|
+
"""Model for projects repository commits diff."""
|
|
16
|
+
|
|
17
|
+
id_column_name = "file_path"
|
|
18
|
+
|
|
19
|
+
backend = GitlabRestBackend()
|
|
20
|
+
|
|
21
|
+
@classmethod
|
|
22
|
+
def destination_name(cls: type[Self]) -> str:
|
|
23
|
+
"""Return the slug of the api endpoint for this model."""
|
|
24
|
+
return "projects/:project_id/repository/files/:file_path"
|
|
25
|
+
|
|
26
|
+
project_id = BelongsToId(gitlab_rest_project_reference.GitlabRestProjectReference)
|
|
27
|
+
project = BelongsToModel("project_id")
|
|
28
|
+
|
|
29
|
+
file_path = String()
|
|
30
|
+
ref = String(default="HEAD")
|
|
31
|
+
lfs = Boolean()
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
class GitlabRestProjectRepositoryFileReference:
|
|
2
|
+
"""Reference to GitlabRestProjectRepositoryFile model."""
|
|
3
|
+
|
|
4
|
+
def get_model_class(self) -> type:
|
|
5
|
+
"""Return the model class this reference points to."""
|
|
6
|
+
from clearskies_gitlab.rest.models import gitlab_rest_project_repository_file
|
|
7
|
+
|
|
8
|
+
return gitlab_rest_project_repository_file.GitlabRestProjectRepositoryFile
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from
|
|
4
|
-
from typing import Any, Self
|
|
3
|
+
from typing import Self
|
|
5
4
|
|
|
6
5
|
from clearskies.columns import BelongsToId, BelongsToModel
|
|
7
6
|
|
|
8
|
-
from clearskies_gitlab.
|
|
9
|
-
from clearskies_gitlab.
|
|
7
|
+
from clearskies_gitlab.rest import gitlab_cicd_variable
|
|
8
|
+
from clearskies_gitlab.rest.backends import GitlabRestBackend
|
|
9
|
+
from clearskies_gitlab.rest.models import gitlab_rest_project_reference
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class GitlabRestProjectVariable(
|
|
13
|
-
gitlab_rest_model.GitlabRestModel,
|
|
14
13
|
gitlab_cicd_variable.GitlabCICDVariable,
|
|
15
14
|
):
|
|
16
15
|
"""Model for gitlab group variables."""
|
|
17
16
|
|
|
17
|
+
backend = GitlabRestBackend()
|
|
18
|
+
id_column_name = "key"
|
|
19
|
+
|
|
18
20
|
@classmethod
|
|
19
21
|
def destination_name(cls: type[Self]) -> str:
|
|
20
22
|
"""Return the slug of the api endpoint for this model."""
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
class GitlabRestProjectVariableReference:
|
|
2
|
+
"""Reference to GitlabRestProjectVariable model."""
|
|
3
|
+
|
|
4
|
+
def get_model_class(self) -> type:
|
|
5
|
+
"""Return the model class this reference points to."""
|
|
6
|
+
from clearskies_gitlab.rest.models import gitlab_rest_project_variable
|
|
7
|
+
|
|
8
|
+
return gitlab_rest_project_variable.GitlabRestProjectVariable
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
clearskies_gitlab/__init__.py,sha256=ClIA0vw3F7SEkiHWukom62Vc023czAhujTj61w8nZL0,129
|
|
2
|
-
clearskies_gitlab/backends/__init__.py,sha256=edqByrjBImEUO1KvHjBHpA9X15uRXxstCYo9UXpJkPM,254
|
|
3
|
-
clearskies_gitlab/backends/gitlab_rest_backend.py,sha256=v8HiKbQyn5i0OvOr6w8Zag4BQznIrDQNg2FaLgL1Iaw,6543
|
|
4
|
-
clearskies_gitlab/defaults/__init__.py,sha256=GF1ggkRAFoRP7F0mzUj0lfMV1WneKa8z3f5eDWLhCKY,216
|
|
5
|
-
clearskies_gitlab/defaults/gitlab_default_auth.py,sha256=iwlvQrYkODVwoyj4hkRdq-OHaLXX0kxasPvBuyTIHnY,323
|
|
6
|
-
clearskies_gitlab/defaults/gitlab_default_url.py,sha256=lfjr5_rNydY-yGGzKp1D-ANdbc51_yIz2AEUF07tO9U,288
|
|
7
|
-
clearskies_gitlab/exceptions/__init__.py,sha256=QUg8lVn91QMENpN_uZmYdNkhI1EjFAWN9X6cMKgKmtE,301
|
|
8
|
-
clearskies_gitlab/exceptions/gitlab_error.py,sha256=DUplWahAT2hC6GZiuapVZc_PEb-D3068CJmaGFg_yek,2000
|
|
9
|
-
clearskies_gitlab/models/__init__.py,sha256=jJ0Knev4oE8ew_RI01rDD-0G1WOZdF7wfyuaGFb9wUk,645
|
|
10
|
-
clearskies_gitlab/models/gitlab_cicd_variable.py,sha256=Bzk6M6ycIqeUxY6uhT_3zRBxm7pkOqdPjEk4JYO2oxM,506
|
|
11
|
-
clearskies_gitlab/models/gitlab_gql_model.py,sha256=NkmQEqECofkNTDWjSywniUCYDG2inejzVgLxyBfqecg,189
|
|
12
|
-
clearskies_gitlab/models/gitlab_group.py,sha256=mmruk1OLSLb5cwN8xtOY30tCXbgtngz399N4WFzzNa4,2283
|
|
13
|
-
clearskies_gitlab/models/gitlab_member.py,sha256=-x0xU_Kf14Bkc9-h27KYxSbdmS6X2LthLI2Gdch0C80,547
|
|
14
|
-
clearskies_gitlab/models/gitlab_namespace.py,sha256=fW9ADAqXrWPJoVBrQo0JbJvccJZKaGmXtJjShwgXxII,917
|
|
15
|
-
clearskies_gitlab/models/gitlab_project.py,sha256=Fx9xiUrhO4YWdCRSFQLuFphPVZEGNfUoj1Cwo2VdJ-0,4223
|
|
16
|
-
clearskies_gitlab/models/gitlab_rest_model.py,sha256=XnlKBuORJPi4AKPNSuCasx3blmmpWZZv-nJfzYbQ54E,225
|
|
17
|
-
clearskies_gitlab/models/rest/__init__.py,sha256=auEn31pkPk8zcbw6ZamNrMbltydjufUIxh-WhcpWx6w,1854
|
|
18
|
-
clearskies_gitlab/models/rest/gitlab_rest_advanced_search.py,sha256=9ftD-rcMhEejzQdEQBxNpQOxtL0yywB0mg5peSpCyMk,893
|
|
19
|
-
clearskies_gitlab/models/rest/gitlab_rest_advanced_search_blob.py,sha256=ZDko71JUsL1-dIsoWulQVlY30L6GMHS8taFUL_k9fn0,688
|
|
20
|
-
clearskies_gitlab/models/rest/gitlab_rest_current_user.py,sha256=fCyrkk3KO66nTH2I7ioggqdUHRSDOKofZRB9qlD19_4,1107
|
|
21
|
-
clearskies_gitlab/models/rest/gitlab_rest_group.py,sha256=wFXleyn34d1gz9pVBYubuBNLx5B2vkcFv9pEtc83DXM,2102
|
|
22
|
-
clearskies_gitlab/models/rest/gitlab_rest_group_access_token.py,sha256=Wx2NOzsgaRizKZNNk_BqAmUq3wOU8E0YQCdzxE8IzR0,904
|
|
23
|
-
clearskies_gitlab/models/rest/gitlab_rest_group_member.py,sha256=0L03cVruwUvJa-laJVA1bVULJM_gS2DZJGjkgF08Sbc,774
|
|
24
|
-
clearskies_gitlab/models/rest/gitlab_rest_group_member_reference.py,sha256=y1gbRc-XJljMizOOa2diA-cxAllACykN7h08RNzfn6k,200
|
|
25
|
-
clearskies_gitlab/models/rest/gitlab_rest_group_project.py,sha256=bQXIFz1GiLjIB2Pm6W_4JuqEd0sefumpmEFMo8_L0Z8,865
|
|
26
|
-
clearskies_gitlab/models/rest/gitlab_rest_group_reference.py,sha256=mJTBjjiPfjYgngzcotUjcWPPRBA0wdUCcOZKdIrxVcQ,174
|
|
27
|
-
clearskies_gitlab/models/rest/gitlab_rest_group_search.py,sha256=Q_bR6es8l8vZGi5u_31d9V2QY6byzYZAu_ACNEWJx7k,547
|
|
28
|
-
clearskies_gitlab/models/rest/gitlab_rest_group_search_blob.py,sha256=EhCs3KkaZsdmf85Ctt8Wgq681YvmgeYK47VBh1bdRIE,353
|
|
29
|
-
clearskies_gitlab/models/rest/gitlab_rest_group_subgroup.py,sha256=l9bGhkULbL0wtQxp4XfoQS7vwfcJdY96NxsKq4FHvKE,1781
|
|
30
|
-
clearskies_gitlab/models/rest/gitlab_rest_group_subgroup_reference.py,sha256=CXdGQQ4Aswk5e4ixMTn8wWGotI5ETl-xESRPuueJSIA,208
|
|
31
|
-
clearskies_gitlab/models/rest/gitlab_rest_group_variable.py,sha256=s24Q6agioITIfX9G2xnNAzySR0BflGiYnLgrXfCGeFQ,629
|
|
32
|
-
clearskies_gitlab/models/rest/gitlab_rest_namespace.py,sha256=PmY2yHY63G2DJBOo5Xe6BdzfcGumM4cVlX1aONLesEY,1919
|
|
33
|
-
clearskies_gitlab/models/rest/gitlab_rest_project.py,sha256=diO2-8QiN9VvXCNa7egKTnIp6SFl6P2lHrG5wkjaUbk,2492
|
|
34
|
-
clearskies_gitlab/models/rest/gitlab_rest_project_reference.py,sha256=oK42SyFQQTIFeidstoIz-_PFq9qwlzyvhq9cmJcqg2E,182
|
|
35
|
-
clearskies_gitlab/models/rest/gitlab_rest_project_repository_commit.py,sha256=R3Km247_TDyYqtQEGM1w5r1BYpUtA1j0cS2XA06Q9tw,1171
|
|
36
|
-
clearskies_gitlab/models/rest/gitlab_rest_project_repository_commit_diff.py,sha256=EAZd1H6AnuwvzW4ZH5KX4prNn_RoV_0PzBlPOHkXOiQ,892
|
|
37
|
-
clearskies_gitlab/models/rest/gitlab_rest_project_variable.py,sha256=FylNaIBiFx7oVOIz9Nltdp0GT2OsjSghDD4nLQAQ1pA,790
|
|
38
|
-
clearskies_gitlab/models/rest/gitlab_rest_project_variable_refence.py,sha256=jdiE-9v5yovfk5HM7vkmQlkkAthmI6YNh6sDQrrjoSU,216
|
|
39
|
-
clear_skies_gitlab-2.0.1.dist-info/METADATA,sha256=aMsKuagx7ecWaqdlzEeTmFT3z4PRzJ99OONnPPxBUAw,2138
|
|
40
|
-
clear_skies_gitlab-2.0.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
41
|
-
clear_skies_gitlab-2.0.1.dist-info/licenses/LICENSE,sha256=MkEX8JF8kZxdyBpTTcB0YTd-xZpWnHvbRlw-pQh8u58,1069
|
|
42
|
-
clear_skies_gitlab-2.0.1.dist-info/RECORD,,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import clearskies
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class GitlabDefaultUrl(clearskies.di.AdditionalConfigAutoImport):
|
|
5
|
-
def provide_gitlab_url(self, environment: clearskies.Environment):
|
|
6
|
-
gitlab_url = environment.get("GITLAB_URL", True)
|
|
7
|
-
return gitlab_url if gitlab_url else "https://gitlab.com/api/v4/"
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from clearskies_gitlab.models import rest
|
|
4
|
-
from clearskies_gitlab.models.gitlab_cicd_variable import GitlabCICDVariable
|
|
5
|
-
from clearskies_gitlab.models.gitlab_gql_model import GitlabGqlModel
|
|
6
|
-
from clearskies_gitlab.models.gitlab_group import GitlabGroup
|
|
7
|
-
from clearskies_gitlab.models.gitlab_member import GitlabMember
|
|
8
|
-
from clearskies_gitlab.models.gitlab_project import GitlabProject
|
|
9
|
-
from clearskies_gitlab.models.gitlab_rest_model import GitlabRestModel
|
|
10
|
-
|
|
11
|
-
__all__ = [
|
|
12
|
-
"rest",
|
|
13
|
-
"GitlabGqlModel",
|
|
14
|
-
"GitlabGroup",
|
|
15
|
-
"GitlabMember",
|
|
16
|
-
"GitlabCICDVariable",
|
|
17
|
-
"GitlabProject",
|
|
18
|
-
"GitlabRestModel",
|
|
19
|
-
]
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from collections import OrderedDict
|
|
4
|
-
from typing import Any
|
|
5
|
-
|
|
6
|
-
from clearskies import Model
|
|
7
|
-
from clearskies.columns import Boolean, Datetime, Integer, Json, Select, String
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class GitlabNamespace(Model):
|
|
11
|
-
"""Base model for namespaces."""
|
|
12
|
-
|
|
13
|
-
id_column_name = "id"
|
|
14
|
-
|
|
15
|
-
id = String()
|
|
16
|
-
name = String()
|
|
17
|
-
path = String()
|
|
18
|
-
kind = Select(allowed_values=["group", "user"])
|
|
19
|
-
full_path = String()
|
|
20
|
-
avatar_url = String()
|
|
21
|
-
web_url = String()
|
|
22
|
-
billable_members_count = Integer()
|
|
23
|
-
plan = Select(allowed_values=["free", "premium", "ultimate", "bronze", "silver", "gold"])
|
|
24
|
-
end_date = Datetime()
|
|
25
|
-
trial_ends_on = Datetime()
|
|
26
|
-
trial = Boolean()
|
|
27
|
-
root_repository_size = Integer()
|
|
28
|
-
projects_count = Integer()
|
|
29
|
-
max_seats_used = Integer()
|
|
30
|
-
max_seats_used_changed_at = Datetime()
|
|
31
|
-
seats_in_use = Integer()
|
|
32
|
-
members_counts_with_descendants = Integer()
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from clearskies_gitlab.models.rest.gitlab_rest_advanced_search import GitlabRestAdvancedSearch
|
|
4
|
-
from clearskies_gitlab.models.rest.gitlab_rest_advanced_search_blob import GitlabRestAdvancedSearchBlob
|
|
5
|
-
from clearskies_gitlab.models.rest.gitlab_rest_current_user import GitlabRestCurrentUser
|
|
6
|
-
from clearskies_gitlab.models.rest.gitlab_rest_group import GitlabRestGroup
|
|
7
|
-
from clearskies_gitlab.models.rest.gitlab_rest_group_access_token import GitlabRestGroupAccessToken
|
|
8
|
-
from clearskies_gitlab.models.rest.gitlab_rest_group_project import GitlabRestGroupProject
|
|
9
|
-
from clearskies_gitlab.models.rest.gitlab_rest_group_search import GitlabRestGroupSearch
|
|
10
|
-
from clearskies_gitlab.models.rest.gitlab_rest_group_search_blob import GitlabRestGroupSearchBlob
|
|
11
|
-
from clearskies_gitlab.models.rest.gitlab_rest_group_subgroup import GitlabRestGroupSubgroup
|
|
12
|
-
from clearskies_gitlab.models.rest.gitlab_rest_group_variable import GitlabRestGroupVariable
|
|
13
|
-
from clearskies_gitlab.models.rest.gitlab_rest_project import GitlabRestProject
|
|
14
|
-
from clearskies_gitlab.models.rest.gitlab_rest_project_repository_commit import GitlabRestProjectRepositoryCommit
|
|
15
|
-
from clearskies_gitlab.models.rest.gitlab_rest_project_repository_commit_diff import (
|
|
16
|
-
GitlabRestProjectRepositoryCommitDiff,
|
|
17
|
-
)
|
|
18
|
-
from clearskies_gitlab.models.rest.gitlab_rest_project_variable import GitlabRestProjectVariable
|
|
19
|
-
|
|
20
|
-
__all__ = [
|
|
21
|
-
"GitlabRestAdvancedSearch",
|
|
22
|
-
"GitlabRestAdvancedSearchBlob",
|
|
23
|
-
"GitlabRestCurrentUser",
|
|
24
|
-
"GitlabRestGroup",
|
|
25
|
-
"GitlabRestGroupAccessToken",
|
|
26
|
-
"GitlabRestGroupProject",
|
|
27
|
-
"GitlabRestGroupSearch",
|
|
28
|
-
"GitlabRestGroupSearchBlob",
|
|
29
|
-
"GitlabRestGroupSubgroup",
|
|
30
|
-
"GitlabRestGroupVariable",
|
|
31
|
-
"GitlabRestProject",
|
|
32
|
-
"GitlabRestProjectRepositoryCommit",
|
|
33
|
-
"GitlabRestProjectRepositoryCommitDiff",
|
|
34
|
-
"GitlabRestProjectVariable",
|
|
35
|
-
]
|