python-gitlab 6.0.0__py3-none-any.whl → 6.1.0__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.
- gitlab/_version.py +1 -1
- gitlab/cli.py +1 -1
- gitlab/const.py +2 -0
- gitlab/v4/cli.py +1 -1
- gitlab/v4/objects/branches.py +24 -0
- gitlab/v4/objects/groups.py +2 -0
- gitlab/v4/objects/projects.py +9 -1
- gitlab/v4/objects/tags.py +1 -0
- gitlab/v4/objects/users.py +14 -0
- {python_gitlab-6.0.0.dist-info → python_gitlab-6.1.0.dist-info}/METADATA +1 -1
- {python_gitlab-6.0.0.dist-info → python_gitlab-6.1.0.dist-info}/RECORD +16 -16
- {python_gitlab-6.0.0.dist-info → python_gitlab-6.1.0.dist-info}/WHEEL +0 -0
- {python_gitlab-6.0.0.dist-info → python_gitlab-6.1.0.dist-info}/entry_points.txt +0 -0
- {python_gitlab-6.0.0.dist-info → python_gitlab-6.1.0.dist-info}/licenses/AUTHORS +0 -0
- {python_gitlab-6.0.0.dist-info → python_gitlab-6.1.0.dist-info}/licenses/COPYING +0 -0
- {python_gitlab-6.0.0.dist-info → python_gitlab-6.1.0.dist-info}/top_level.txt +0 -0
gitlab/_version.py
CHANGED
gitlab/cli.py
CHANGED
@@ -107,7 +107,7 @@ def gitlab_resource_to_cls(
|
|
107
107
|
return class_type
|
108
108
|
|
109
109
|
|
110
|
-
def cls_to_gitlab_resource(cls: RESTObject) -> str:
|
110
|
+
def cls_to_gitlab_resource(cls: type[RESTObject]) -> str:
|
111
111
|
dasherized_uppercase = camel_upperlower_regex.sub(r"\1-\2", cls.__name__)
|
112
112
|
dasherized_lowercase = camel_lowerupper_regex.sub(r"\1-\2", dasherized_uppercase)
|
113
113
|
return dasherized_lowercase.lower()
|
gitlab/const.py
CHANGED
@@ -93,6 +93,7 @@ DEFAULT_URL: str = "https://gitlab.com"
|
|
93
93
|
NO_ACCESS = AccessLevel.NO_ACCESS.value
|
94
94
|
MINIMAL_ACCESS = AccessLevel.MINIMAL_ACCESS.value
|
95
95
|
GUEST_ACCESS = AccessLevel.GUEST.value
|
96
|
+
PLANNER_ACCESS = AccessLevel.PLANNER.value
|
96
97
|
REPORTER_ACCESS = AccessLevel.REPORTER.value
|
97
98
|
DEVELOPER_ACCESS = AccessLevel.DEVELOPER.value
|
98
99
|
MAINTAINER_ACCESS = AccessLevel.MAINTAINER.value
|
@@ -151,6 +152,7 @@ __all__ = [
|
|
151
152
|
"NOTIFICATION_LEVEL_PARTICIPATING",
|
152
153
|
"NOTIFICATION_LEVEL_WATCH",
|
153
154
|
"OWNER_ACCESS",
|
155
|
+
"PLANNER_ACCESS",
|
154
156
|
"REPORTER_ACCESS",
|
155
157
|
"SEARCH_SCOPE_BLOBS",
|
156
158
|
"SEARCH_SCOPE_COMMITS",
|
gitlab/v4/cli.py
CHANGED
@@ -394,7 +394,7 @@ def extend_parser(parser: argparse.ArgumentParser) -> argparse.ArgumentParser:
|
|
394
394
|
subparsers.required = True
|
395
395
|
|
396
396
|
# populate argparse for all Gitlab Object
|
397
|
-
classes = set()
|
397
|
+
classes: set[type[gitlab.base.RESTObject]] = set()
|
398
398
|
for cls in gitlab.v4.objects.__dict__.values():
|
399
399
|
if not isinstance(cls, type):
|
400
400
|
continue
|
gitlab/v4/objects/branches.py
CHANGED
@@ -49,3 +49,27 @@ class ProjectProtectedBranchManager(CRUDMixin[ProjectProtectedBranch]):
|
|
49
49
|
),
|
50
50
|
)
|
51
51
|
_update_method = UpdateMethod.PATCH
|
52
|
+
|
53
|
+
|
54
|
+
class GroupProtectedBranch(SaveMixin, ObjectDeleteMixin, RESTObject):
|
55
|
+
_id_attr = "name"
|
56
|
+
|
57
|
+
|
58
|
+
class GroupProtectedBranchManager(CRUDMixin[GroupProtectedBranch]):
|
59
|
+
_path = "/groups/{group_id}/protected_branches"
|
60
|
+
_obj_cls = GroupProtectedBranch
|
61
|
+
_from_parent_attrs = {"group_id": "id"}
|
62
|
+
_create_attrs = RequiredOptional(
|
63
|
+
required=("name",),
|
64
|
+
optional=(
|
65
|
+
"push_access_level",
|
66
|
+
"merge_access_level",
|
67
|
+
"unprotect_access_level",
|
68
|
+
"allow_force_push",
|
69
|
+
"allowed_to_push",
|
70
|
+
"allowed_to_merge",
|
71
|
+
"allowed_to_unprotect",
|
72
|
+
"code_owner_approval_required",
|
73
|
+
),
|
74
|
+
)
|
75
|
+
_update_method = UpdateMethod.PATCH
|
gitlab/v4/objects/groups.py
CHANGED
@@ -24,6 +24,7 @@ from .access_requests import GroupAccessRequestManager # noqa: F401
|
|
24
24
|
from .audit_events import GroupAuditEventManager # noqa: F401
|
25
25
|
from .badges import GroupBadgeManager # noqa: F401
|
26
26
|
from .boards import GroupBoardManager # noqa: F401
|
27
|
+
from .branches import GroupProtectedBranchManager # noqa: F401
|
27
28
|
from .clusters import GroupClusterManager # noqa: F401
|
28
29
|
from .container_registry import GroupRegistryRepositoryManager # noqa: F401
|
29
30
|
from .custom_attributes import GroupCustomAttributeManager # noqa: F401
|
@@ -102,6 +103,7 @@ class Group(SaveMixin, ObjectDeleteMixin, RESTObject):
|
|
102
103
|
packages: GroupPackageManager
|
103
104
|
projects: GroupProjectManager
|
104
105
|
shared_projects: SharedProjectManager
|
106
|
+
protectedbranches: GroupProtectedBranchManager
|
105
107
|
pushrules: GroupPushRulesManager
|
106
108
|
registry_repositories: GroupRegistryRepositoryManager
|
107
109
|
runners: GroupRunnerManager
|
gitlab/v4/objects/projects.py
CHANGED
@@ -429,6 +429,7 @@ class Project(
|
|
429
429
|
ref: str,
|
430
430
|
token: str,
|
431
431
|
variables: dict[str, Any] | None = None,
|
432
|
+
inputs: dict[str, Any] | None = None,
|
432
433
|
**kwargs: Any,
|
433
434
|
) -> ProjectPipeline:
|
434
435
|
"""Trigger a CI build.
|
@@ -439,6 +440,7 @@ class Project(
|
|
439
440
|
ref: Commit to build; can be a branch name or a tag
|
440
441
|
token: The trigger token
|
441
442
|
variables: Variables passed to the build script
|
443
|
+
inputs: Inputs passed to the build script
|
442
444
|
**kwargs: Extra options to send to the server (e.g. sudo)
|
443
445
|
|
444
446
|
Raises:
|
@@ -446,8 +448,14 @@ class Project(
|
|
446
448
|
GitlabCreateError: If the server failed to perform the request
|
447
449
|
"""
|
448
450
|
variables = variables or {}
|
451
|
+
inputs = inputs or {}
|
449
452
|
path = f"/projects/{self.encoded_id}/trigger/pipeline"
|
450
|
-
post_data = {
|
453
|
+
post_data = {
|
454
|
+
"ref": ref,
|
455
|
+
"token": token,
|
456
|
+
"variables": variables,
|
457
|
+
"inputs": inputs,
|
458
|
+
}
|
451
459
|
attrs = self.manager.gitlab.http_post(path, post_data=post_data, **kwargs)
|
452
460
|
if TYPE_CHECKING:
|
453
461
|
assert isinstance(attrs, dict)
|
gitlab/v4/objects/tags.py
CHANGED
@@ -19,6 +19,7 @@ class ProjectTagManager(NoUpdateMixin[ProjectTag]):
|
|
19
19
|
_path = "/projects/{project_id}/repository/tags"
|
20
20
|
_obj_cls = ProjectTag
|
21
21
|
_from_parent_attrs = {"project_id": "id"}
|
22
|
+
_list_filters = ("order_by", "sort", "search")
|
22
23
|
_create_attrs = RequiredOptional(
|
23
24
|
required=("tag_name", "ref"), optional=("message",)
|
24
25
|
)
|
gitlab/v4/objects/users.py
CHANGED
@@ -68,6 +68,8 @@ __all__ = [
|
|
68
68
|
"UserMembershipManager",
|
69
69
|
"UserProject",
|
70
70
|
"UserProjectManager",
|
71
|
+
"UserContributedProject",
|
72
|
+
"UserContributedProjectManager",
|
71
73
|
]
|
72
74
|
|
73
75
|
|
@@ -182,6 +184,7 @@ class User(SaveMixin, ObjectDeleteMixin, RESTObject):
|
|
182
184
|
memberships: UserMembershipManager
|
183
185
|
personal_access_tokens: UserPersonalAccessTokenManager
|
184
186
|
projects: UserProjectManager
|
187
|
+
contributed_projects: UserContributedProjectManager
|
185
188
|
starred_projects: StarredProjectManager
|
186
189
|
status: UserStatusManager
|
187
190
|
|
@@ -665,6 +668,17 @@ class UserProjectManager(ListMixin[UserProject], CreateMixin[UserProject]):
|
|
665
668
|
return super().list(path=path, iterator=iterator, **kwargs)
|
666
669
|
|
667
670
|
|
671
|
+
class UserContributedProject(RESTObject):
|
672
|
+
_id_attr = "id"
|
673
|
+
_repr_attr = "path_with_namespace"
|
674
|
+
|
675
|
+
|
676
|
+
class UserContributedProjectManager(ListMixin[UserContributedProject]):
|
677
|
+
_path = "/users/{user_id}/contributed_projects"
|
678
|
+
_obj_cls = UserContributedProject
|
679
|
+
_from_parent_attrs = {"user_id": "id"}
|
680
|
+
|
681
|
+
|
668
682
|
class StarredProject(RESTObject):
|
669
683
|
pass
|
670
684
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: python-gitlab
|
3
|
-
Version: 6.
|
3
|
+
Version: 6.1.0
|
4
4
|
Summary: The python wrapper for the GitLab REST and GraphQL APIs.
|
5
5
|
Author-email: Gauvain Pocentek <gauvain@pocentek.net>
|
6
6
|
Maintainer-email: John Villalovos <john@sodarock.com>, Max Wittig <max.wittig@siemens.com>, Nejc Habjan <nejc.habjan@siemens.com>, Roger Meier <r.meier@siemens.com>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
gitlab/__init__.py,sha256=pdbvZNyXeXLn0fGXSTsBqi_ic7QLY7-9FL3uA6tvfdI,1416
|
2
2
|
gitlab/__main__.py,sha256=HTesNl0UAU6mPb9EXWkTKMy6Q6pAUxGi3iPnDHTE2uE,68
|
3
|
-
gitlab/_version.py,sha256=
|
3
|
+
gitlab/_version.py,sha256=th1GdiUp6pJCkoE28MZyRq5-NaEp6XaHGzUE0hCf89g,249
|
4
4
|
gitlab/base.py,sha256=xynWUZcMIbxiWLO17nnvqCsbC-lBvsy0rvWtTJOpuug,13790
|
5
|
-
gitlab/cli.py,sha256=
|
5
|
+
gitlab/cli.py,sha256=sid5FhHE_VcJMPq5IkFWsPq0vpnEu3ZD8FaHboUYKcQ,12355
|
6
6
|
gitlab/client.py,sha256=JkUKU2M_d4DPK7PQzOisV8T0O_RzrDf8fDPndjv59_c,54452
|
7
7
|
gitlab/config.py,sha256=knMTQZSepMI9Z0_3CTgzqg5Wsrk_f3FNfxUM5RoeVx4,9022
|
8
|
-
gitlab/const.py,sha256=
|
8
|
+
gitlab/const.py,sha256=IKpS-AQeRpAXIdT_KpzhDuTR8-KilbUudL-TQv4njFk,5179
|
9
9
|
gitlab/exceptions.py,sha256=9Ql-z8qGQAmd_1rx1IAXzLRYmQThDeNq6vqOpCxXAjQ,8391
|
10
10
|
gitlab/mixins.py,sha256=Z1LqcgN-kZBaxXnhk3h_j8TAmUPDxP0sSymP00hjPYQ,35515
|
11
11
|
gitlab/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -16,7 +16,7 @@ gitlab/_backends/graphql.py,sha256=wUEjrtz4KAFIFLc13cTj8D1757yeSeViX-xzoDy90Is,1
|
|
16
16
|
gitlab/_backends/protocol.py,sha256=_53iLo017Reni0GoxUR4sQcM5pWxOFY0ljQsYUwpFCU,705
|
17
17
|
gitlab/_backends/requests_backend.py,sha256=BmIcITkrxfJtNTYrjqbT7ldXZsjlbGU2n8xBdBaPAQ0,5443
|
18
18
|
gitlab/v4/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
19
|
-
gitlab/v4/cli.py,sha256=
|
19
|
+
gitlab/v4/cli.py,sha256=kZh-VdoEZTd9dQ6t2MeUPGf26t5StlD-tnrcXptbp4k,22849
|
20
20
|
gitlab/v4/objects/__init__.py,sha256=cWZQgpn8TqbjmrNstzR_YlK3NntZT7zGrjQ1vbwQ0OM,2210
|
21
21
|
gitlab/v4/objects/access_requests.py,sha256=QQ7cj6W4VYE8UH5HIwBO47MjXemMnO6jOqhTQttfM5I,1040
|
22
22
|
gitlab/v4/objects/appearance.py,sha256=NGN4BJT5AqN3Ex1io7ZJjOK91oOkwvx_6JXjYG474MI,1815
|
@@ -26,7 +26,7 @@ gitlab/v4/objects/audit_events.py,sha256=mTKdulCVZU-l9-f11FXV4xQPYNTfkusGZwkGRrd
|
|
26
26
|
gitlab/v4/objects/award_emojis.py,sha256=NLVGq37i7FU6dXeJyzlm7bmscq-vvAypY2AiIZzu0rk,4229
|
27
27
|
gitlab/v4/objects/badges.py,sha256=01Zt0q1M71EOB-nJ2PM2Pf6od8KeA4mMEAd14Cs2_Bo,1077
|
28
28
|
gitlab/v4/objects/boards.py,sha256=7boXeaF2fSbqf66e9BjqI-ghdtPt6JiYgWt-BOnprUo,1952
|
29
|
-
gitlab/v4/objects/branches.py,sha256=
|
29
|
+
gitlab/v4/objects/branches.py,sha256=Be4gvJiUhxxrCCbZ0XsrGZxyKH9R31w8HNHUb8DCMns,2111
|
30
30
|
gitlab/v4/objects/broadcast_messages.py,sha256=2T57OyuWiMlzmY3k52QSYaNFOgzdczU_LWjWsNXG1E8,858
|
31
31
|
gitlab/v4/objects/bulk_imports.py,sha256=o-BPrl0lOmJn5jASyuVqJtCFHbLZPXW_MOIP2kdbUBg,1229
|
32
32
|
gitlab/v4/objects/ci_lint.py,sha256=tDhPE2FXUsN00kPV23OadA8VQpmTcpcitk56Nj1o_HM,2178
|
@@ -48,7 +48,7 @@ gitlab/v4/objects/features.py,sha256=ZwuvXWWOb5rrBOpMQ-B9oGGVbtyn-bjzW9K7BwJL3Rs
|
|
48
48
|
gitlab/v4/objects/files.py,sha256=mpvbwlrSJ9d6YRqaWUocYRLslTH8iOm7DHA71SX9kE0,12931
|
49
49
|
gitlab/v4/objects/geo_nodes.py,sha256=ebCfIulBIbmwdp_CfLxANDzsUdeFoxQTjfshlz0t_-E,3511
|
50
50
|
gitlab/v4/objects/group_access_tokens.py,sha256=BdkboLhzav14FoiHIkPHrix5nsYqlcnC1l6Aa59LMcQ,845
|
51
|
-
gitlab/v4/objects/groups.py,sha256=
|
51
|
+
gitlab/v4/objects/groups.py,sha256=ztzTC-9tXXHZG-BTPQpJd3us0KNEsXOMkpVjlJKMJ_0,15898
|
52
52
|
gitlab/v4/objects/hooks.py,sha256=YA_xTUvHUVLzLxy9lDqrl_ruYuwunQyy2b3gai_L40E,3895
|
53
53
|
gitlab/v4/objects/integrations.py,sha256=qvEHOWH4nO5kG9E0s6ZugE3blX3K4X-kjYEEljMSPO4,8837
|
54
54
|
gitlab/v4/objects/invitations.py,sha256=9qTbaK4lf5XkEbAIXPhj6adcWh7a27vpdg5qmYkxYeA,2422
|
@@ -74,7 +74,7 @@ gitlab/v4/objects/pages.py,sha256=wUioc0uYDMIU_K9GpAiS9bG45WnS0NXC5874h6VUebk,15
|
|
74
74
|
gitlab/v4/objects/personal_access_tokens.py,sha256=bm-MawqOH1zH8PvVgxFpU9uQacUndhUCMMRQxBS8lSs,1147
|
75
75
|
gitlab/v4/objects/pipelines.py,sha256=01WpGWYU5JdkCvkA_UhYx94ukEbyOeMrE-Da_tTaLa8,10030
|
76
76
|
gitlab/v4/objects/project_access_tokens.py,sha256=FZMg0NIo5TpT_F_SBZ5nD76JjaYIBOL3RddfYTGwxt8,869
|
77
|
-
gitlab/v4/objects/projects.py,sha256=
|
77
|
+
gitlab/v4/objects/projects.py,sha256=EM3yP0IACNmmaYl7u0OskBleTHVulUelPotV50aoSAY,48976
|
78
78
|
gitlab/v4/objects/push_rules.py,sha256=CWOCljZupz2K1Wd2A2WP648alD0ux2FJQBydxDsPZd4,2902
|
79
79
|
gitlab/v4/objects/registry_protection_repository_rules.py,sha256=B_In_IJ-8HrX_R-Vd5yyQoKOvPzhUbl3PNAKoH8Tobk,1223
|
80
80
|
gitlab/v4/objects/registry_protection_rules.py,sha256=FkhVtR5ugFlpdu5UO0Xuiy3WKKbo0JzY6sSXOjU4DZ0,1121
|
@@ -90,18 +90,18 @@ gitlab/v4/objects/sidekiq.py,sha256=4o5YTft-5UScQ8Qu4KbtUKsB-49eCxBc6DfPZ_IJ5zo,
|
|
90
90
|
gitlab/v4/objects/snippets.py,sha256=ZBvU8l6mrbHWlnG7zY6SInruAId3PioAv0zrxayzr2A,10507
|
91
91
|
gitlab/v4/objects/statistics.py,sha256=Q6D0gCK1bBoXfpblUAo9mX9ICtGgY-QSYjDahb0UA74,2018
|
92
92
|
gitlab/v4/objects/status_checks.py,sha256=nFrZ4OcT-r_ra8mWv52EQWlh99GL1kZ2GQZ287ZoOns,1727
|
93
|
-
gitlab/v4/objects/tags.py,sha256=
|
93
|
+
gitlab/v4/objects/tags.py,sha256=Xw4pCObUy4nehnIFV9HFPpKGh_tOzZVNWh1npjuX-lU,1103
|
94
94
|
gitlab/v4/objects/templates.py,sha256=P7mqNADXsSy5dHXQcWoI0Rqz-qIOgbtbwUxyv2hTWFc,3201
|
95
95
|
gitlab/v4/objects/todos.py,sha256=6MOu74xrlJSnNYcsTW63AQIMfW0vG_5Nl4eyBn9uPfg,1821
|
96
96
|
gitlab/v4/objects/topics.py,sha256=tWc8eMuRqxtkEPp0dT2OJtycz4xo93xYrmKFOLQTtRE,1961
|
97
97
|
gitlab/v4/objects/triggers.py,sha256=1iYdlP8qpqwEctr6kKJSDanRulaKEHYnVwYwVGainI4,581
|
98
|
-
gitlab/v4/objects/users.py,sha256=
|
98
|
+
gitlab/v4/objects/users.py,sha256=cVEMR0SXVVFVKFUw9fPyv5mC0HSwspl3ifE7-rhnWmQ,20620
|
99
99
|
gitlab/v4/objects/variables.py,sha256=B7XHDKPrRg-sboVpClO0vYbxe6egH9U1-SPgVHv6tPc,2051
|
100
100
|
gitlab/v4/objects/wikis.py,sha256=fR4QG4WIBeG10eBNfCN3CG-w3qlEBJIBVsJFxVVVhEs,1364
|
101
|
-
python_gitlab-6.
|
102
|
-
python_gitlab-6.
|
103
|
-
python_gitlab-6.
|
104
|
-
python_gitlab-6.
|
105
|
-
python_gitlab-6.
|
106
|
-
python_gitlab-6.
|
107
|
-
python_gitlab-6.
|
101
|
+
python_gitlab-6.1.0.dist-info/licenses/AUTHORS,sha256=Z0P61GJSVnp7iFbRcMezhx3f4zMyPkVmG--TWaRo768,526
|
102
|
+
python_gitlab-6.1.0.dist-info/licenses/COPYING,sha256=2n6rt7r999OuXp8iOqW9we7ORaxWncIbOwN1ILRGR2g,7651
|
103
|
+
python_gitlab-6.1.0.dist-info/METADATA,sha256=lhEMQSm8mVX2uyAY6jp35OpjDVAajwqKs_oDCzm6j00,8500
|
104
|
+
python_gitlab-6.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
105
|
+
python_gitlab-6.1.0.dist-info/entry_points.txt,sha256=nhpKLLP_uQPFByn8UtE9zsvQQwa402t52o_Cw9IFXMo,43
|
106
|
+
python_gitlab-6.1.0.dist-info/top_level.txt,sha256=MvIaP8p_Oaf4gO_hXmHkX-5y2deHLp1pe6tJR3ukQ6o,7
|
107
|
+
python_gitlab-6.1.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|