summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2017-11-11 15:11:12 +0100
committerGauvain Pocentek <gauvain@pocentek.net>2017-11-11 15:11:12 +0100
commit397d67745f573f1d6bcf9399e3ee602640b019c8 (patch)
treeee03fac11372e278229f54b4a5d4669bbd171a36 /gitlab/v4/objects.py
parentad35482bdeb587ec816cac4f2231b93fcdd0066a (diff)
downloadgitlab-397d67745f573f1d6bcf9399e3ee602640b019c8.tar.gz
Add support for user_agent_detail (issues)
https://docs.gitlab.com/ce/api/issues.html#get-user-agent-details
Diffstat (limited to 'gitlab/v4/objects.py')
-rw-r--r--gitlab/v4/objects.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index 18e208b..722f8ab 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -1128,6 +1128,21 @@ class ProjectIssue(SubscribableMixin, TodoMixin, TimeTrackingMixin, SaveMixin,
_id_attr = 'iid'
_managers = (('notes', 'ProjectIssueNoteManager'), )
+ @cli.register_custom_action('ProjectIssue')
+ @exc.on_http_error(exc.GitlabUpdateError)
+ def user_agent_detail(self, **kwargs):
+ """Get user agent detail.
+
+ Args:
+ **kwargs: Extra options to send to the server (e.g. sudo)
+
+ Raises:
+ GitlabAuthenticationError: If authentication is not correct
+ GitlabGetError: If the detail could not be retrieved
+ """
+ path = '%s/%s/user_agent_detail' % (self.manager.path, self.get_id())
+ return self.manager.gitlab.http_get(path, **kwargs)
+
@cli.register_custom_action('ProjectIssue', ('to_project_id',))
@exc.on_http_error(exc.GitlabUpdateError)
def move(self, to_project_id, **kwargs):