Skip to content

Commit fc5c52c

Browse files
Asher256@users.noreply.github.comAsher256@users.noreply.github.com
Asher256@users.noreply.github.com
authored and
Asher256@users.noreply.github.com
committed
enable/disable deploy key methos moved to the class ProjectKey()
1 parent 67aa795 commit fc5c52c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

gitlab/objects.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -1249,23 +1249,23 @@ class ProjectKey(GitlabObject):
12491249
requiredUrlAttrs = ['project_id']
12501250
requiredCreateAttrs = ['title', 'key']
12511251

1252-
1253-
class ProjectKeyManager(BaseManager):
1254-
obj_cls = ProjectKey
1255-
12561252
def enable_deploy_key(self, project_id, key_id):
1257-
"""Enable a deploy key in a project."""
1253+
"""Enable a deploy key for a project."""
12581254
url = '/projects/%s/deploy_keys/%s/enable' % (project_id, key_id)
12591255
r = self.gitlab._raw_post(url)
12601256
raise_error_from_response(r, GitlabBuildRetryError, 201)
12611257

12621258
def disable_deploy_key(self, project_id, key_id):
1263-
"""Disable a deploy key in a project."""
1259+
"""Disable a deploy key for a project."""
12641260
url = '/projects/%s/deploy_keys/%s/disable' % (project_id, key_id)
12651261
r = self.gitlab._raw_delete(url)
12661262
raise_error_from_response(r, GitlabBuildRetryError, 201)
12671263

12681264

1265+
class ProjectKeyManager(BaseManager):
1266+
obj_cls = ProjectKey
1267+
1268+
12691269
class ProjectEvent(GitlabObject):
12701270
_url = '/projects/%(project_id)s/events'
12711271
canGet = 'from_list'

0 commit comments

Comments
 (0)