File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1253,6 +1253,18 @@ class ProjectKey(GitlabObject):
1253
1253
class ProjectKeyManager (BaseManager ):
1254
1254
obj_cls = ProjectKey
1255
1255
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
+
1256
1268
1257
1269
class ProjectEvent (GitlabObject ):
1258
1270
_url = '/projects/%(project_id)s/events'
You can’t perform that action at this time.
0 commit comments