@@ -936,11 +936,11 @@ def subscribe(self, **kwargs):
936
936
GitlabConnectionError: If the server cannot be reached.
937
937
GitlabSubscribeError: If the subscription cannot be done
938
938
"""
939
- url = ('/projects/%(project_id)s/issues/%(issue_id)s/subscription ' %
939
+ url = ('/projects/%(project_id)s/issues/%(issue_id)s/subscribe ' %
940
940
{'project_id' : self .project_id , 'issue_id' : self .id })
941
941
942
942
r = self .gitlab ._raw_post (url , ** kwargs )
943
- raise_error_from_response (r , GitlabSubscribeError )
943
+ raise_error_from_response (r , GitlabSubscribeError , [ 201 , 304 ] )
944
944
self ._set_from_dict (r .json ())
945
945
946
946
def unsubscribe (self , ** kwargs ):
@@ -950,11 +950,11 @@ def unsubscribe(self, **kwargs):
950
950
GitlabConnectionError: If the server cannot be reached.
951
951
GitlabUnsubscribeError: If the unsubscription cannot be done
952
952
"""
953
- url = ('/projects/%(project_id)s/issues/%(issue_id)s/subscription ' %
953
+ url = ('/projects/%(project_id)s/issues/%(issue_id)s/unsubscribe ' %
954
954
{'project_id' : self .project_id , 'issue_id' : self .id })
955
955
956
- r = self .gitlab ._raw_delete (url , ** kwargs )
957
- raise_error_from_response (r , GitlabUnsubscribeError )
956
+ r = self .gitlab ._raw_post (url , ** kwargs )
957
+ raise_error_from_response (r , GitlabUnsubscribeError , [ 201 , 304 ] )
958
958
self ._set_from_dict (r .json ())
959
959
960
960
def move (self , to_project_id , ** kwargs ):
@@ -1199,7 +1199,7 @@ def subscribe(self, **kwargs):
1199
1199
GitlabSubscribeError: If the subscription cannot be done
1200
1200
"""
1201
1201
url = ('/projects/%(project_id)s/merge_requests/%(mr_id)s/'
1202
- 'subscription ' %
1202
+ 'subscribe ' %
1203
1203
{'project_id' : self .project_id , 'mr_id' : self .id })
1204
1204
1205
1205
r = self .gitlab ._raw_post (url , ** kwargs )
@@ -1215,11 +1215,11 @@ def unsubscribe(self, **kwargs):
1215
1215
GitlabUnsubscribeError: If the unsubscription cannot be done
1216
1216
"""
1217
1217
url = ('/projects/%(project_id)s/merge_requests/%(mr_id)s/'
1218
- 'subscription ' %
1218
+ 'unsubscribe ' %
1219
1219
{'project_id' : self .project_id , 'mr_id' : self .id })
1220
1220
1221
- r = self .gitlab ._raw_delete (url , ** kwargs )
1222
- raise_error_from_response (r , GitlabUnsubscribeError , [200 , 304 ])
1221
+ r = self .gitlab ._raw_post (url , ** kwargs )
1222
+ raise_error_from_response (r , GitlabUnsubscribeError , [201 , 304 ])
1223
1223
if r .status_code == 200 :
1224
1224
self ._set_from_dict (r .json ())
1225
1225
@@ -1458,7 +1458,7 @@ def subscribe(self, **kwargs):
1458
1458
GitlabConnectionError: If the server cannot be reached.
1459
1459
GitlabSubscribeError: If the subscription cannot be done
1460
1460
"""
1461
- url = ('/projects/%(project_id)s/labels/%(label_id)s/subscription ' %
1461
+ url = ('/projects/%(project_id)s/labels/%(label_id)s/subscribe ' %
1462
1462
{'project_id' : self .project_id , 'label_id' : self .name })
1463
1463
1464
1464
r = self .gitlab ._raw_post (url , ** kwargs )
@@ -1472,11 +1472,11 @@ def unsubscribe(self, **kwargs):
1472
1472
GitlabConnectionError: If the server cannot be reached.
1473
1473
GitlabUnsubscribeError: If the unsubscription cannot be done
1474
1474
"""
1475
- url = ('/projects/%(project_id)s/labels/%(label_id)s/subscription ' %
1475
+ url = ('/projects/%(project_id)s/labels/%(label_id)s/unsubscribe ' %
1476
1476
{'project_id' : self .project_id , 'label_id' : self .name })
1477
1477
1478
- r = self .gitlab ._raw_delete (url , ** kwargs )
1479
- raise_error_from_response (r , GitlabUnsubscribeError , [200 , 304 ])
1478
+ r = self .gitlab ._raw_post (url , ** kwargs )
1479
+ raise_error_from_response (r , GitlabUnsubscribeError , [201 , 304 ])
1480
1480
self ._set_from_dict (r .json ())
1481
1481
1482
1482
0 commit comments