diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2016-05-28 09:59:26 +0200 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2016-05-28 09:59:26 +0200 |
commit | 1b14f5c9b1ff0af083abedff80eafb9adcae629c (patch) | |
tree | a586652141a492133c33dc4cbccb19d7ffce824c /gitlab/objects.py | |
parent | 7bbbfbdc534a4d26aa61b1b4287911c9f7c6f8a5 (diff) | |
download | gitlab-1b14f5c9b1ff0af083abedff80eafb9adcae629c.tar.gz |
project issue: doc and CLI for (un)subscribe
Diffstat (limited to 'gitlab/objects.py')
-rw-r--r-- | gitlab/objects.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gitlab/objects.py b/gitlab/objects.py index a865ad4..313ed96 100644 --- a/gitlab/objects.py +++ b/gitlab/objects.py @@ -999,6 +999,12 @@ class ProjectIssue(GitlabObject): **kwargs) def subscribe(self, **kwargs): + """Subscribe to an issue. + + Raises: + GitlabConnectionError: If the server cannot be reached. + GitlabSubscribeError: If the subscription cannot be done + """ url = ('/projects/%(project_id)s/issues/%(issue_id)s/subscription' % {'project_id': self.project_id, 'issue_id': self.id}) @@ -1007,6 +1013,12 @@ class ProjectIssue(GitlabObject): self._set_from_dict(r.json()) def unsubscribe(self, **kwargs): + """Unsubscribe an issue. + + Raises: + GitlabConnectionError: If the server cannot be reached. + GitlabSubscribeError: If the unsubscription cannot be done + """ url = ('/projects/%(project_id)s/issues/%(issue_id)s/subscription' % {'project_id': self.project_id, 'issue_id': self.id}) |