File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1253,6 +1253,18 @@ class ProjectKey(GitlabObject):
12531253class ProjectKeyManager (BaseManager ):
12541254 obj_cls = ProjectKey
12551255
1256+ def enable_deploy_key (self , project_id , key_id ):
1257+ """Enable a deploy key in a project."""
1258+ url = '/projects/%s/deploy_keys/%s/enable' % (project_id , key_id )
1259+ r = self .gitlab ._raw_post (url )
1260+ raise_error_from_response (r , GitlabBuildRetryError , 201 )
1261+
1262+ def disable_deploy_key (self , project_id , key_id ):
1263+ """Disable a deploy key in a project."""
1264+ url = '/projects/%s/deploy_keys/%s/disable' % (project_id , key_id )
1265+ r = self .gitlab ._raw_post (url )
1266+ raise_error_from_response (r , GitlabBuildRetryError , 201 )
1267+
12561268
12571269class ProjectEvent (GitlabObject ):
12581270 _url = '/projects/%(project_id)s/events'
You can’t perform that action at this time.
0 commit comments