summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects.py
diff options
context:
space:
mode:
authorEric Sabouraud <esabouraud@users.noreply.github.com>2018-10-03 21:36:56 +0200
committerGauvain Pocentek <gauvainpocentek@gmail.com>2018-10-03 21:36:56 +0200
commitea71f1d121b723140671e2090182174234f0e2a1 (patch)
tree4b708c8d0910b17f605639e59d92e22c17a7c12e /gitlab/v4/objects.py
parent77f4d3af9c1e5f08b8f4e3aa32c7944c9814dab0 (diff)
downloadgitlab-ea71f1d121b723140671e2090182174234f0e2a1.tar.gz
Add project protected tags management (#581)
Diffstat (limited to 'gitlab/v4/objects.py')
-rw-r--r--gitlab/v4/objects.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index 1d771ae..281301e 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -1965,6 +1965,18 @@ class ProjectTagManager(NoUpdateMixin, RESTManager):
_create_attrs = (('tag_name', 'ref'), ('message',))
+class ProjectProtectedTag(ObjectDeleteMixin, RESTObject):
+ _id_attr = 'name'
+ _short_print_attr = 'name'
+
+
+class ProjectProtectedTagManager(NoUpdateMixin, RESTManager):
+ _path = '/projects/%(project_id)s/protected_tags'
+ _obj_cls = ProjectProtectedTag
+ _from_parent_attrs = {'project_id': 'id'}
+ _create_attrs = (('name',), ('create_access_level',))
+
+
class ProjectMergeRequestApproval(SaveMixin, RESTObject):
_id_attr = None
@@ -3124,6 +3136,7 @@ class Project(SaveMixin, ObjectDeleteMixin, RESTObject):
('pagesdomains', 'ProjectPagesDomainManager'),
('pipelines', 'ProjectPipelineManager'),
('protectedbranches', 'ProjectProtectedBranchManager'),
+ ('protectedtags', 'ProjectProtectedTagManager'),
('pipelineschedules', 'ProjectPipelineScheduleManager'),
('pushrules', 'ProjectPushRulesManager'),
('runners', 'ProjectRunnerManager'),