diff options
author | Eric Sabouraud <esabouraud@users.noreply.github.com> | 2018-02-28 16:02:12 +0100 |
---|---|---|
committer | Eric Sabouraud <esabouraud@users.noreply.github.com> | 2018-02-28 16:02:12 +0100 |
commit | c8c4b4262113860b61318706b913f45634279ec6 (patch) | |
tree | fd6ab9ffffd560a200cc5eb7f36b0d10ef15ed96 /gitlab/v3/objects.py | |
parent | 5fdd06e1ee57e42a746aefcb96d819c0ed7835bf (diff) | |
download | gitlab-c8c4b4262113860b61318706b913f45634279ec6.tar.gz |
Add support for unsharing projects to v3 API (untested)
Diffstat (limited to 'gitlab/v3/objects.py')
-rw-r--r-- | gitlab/v3/objects.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gitlab/v3/objects.py b/gitlab/v3/objects.py index 0db9dfd..dec2933 100644 --- a/gitlab/v3/objects.py +++ b/gitlab/v3/objects.py @@ -2056,6 +2056,20 @@ class Project(GitlabObject): r = self.gitlab._raw_post(url, data=data, **kwargs) raise_error_from_response(r, GitlabCreateError, 201) + def unshare(self, group_id, **kwargs): + """Delete a shared project link within a group. + + Args: + group_id (int): ID of the group. + + Raises: + GitlabConnectionError: If the server cannot be reached. + GitlabDeleteError: If the server fails to perform the request. + """ + url = "/projects/%s/share/%s" % (self.id, group_id) + r = self.gitlab._raw_delete(url, **kwargs) + raise_error_from_response(r, GitlabDeleteError, 204) + def trigger_build(self, ref, token, variables={}, **kwargs): """Trigger a CI build. |