summaryrefslogtreecommitdiff
path: root/gitlab/objects.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2016-07-24 18:06:29 +0200
committerGauvain Pocentek <gauvain@pocentek.net>2016-07-24 18:06:29 +0200
commit580f21ea9a80bfe7062296ac7684489d5375df69 (patch)
treea9f33f46af28fc403cb9046848d431d916a9ecd2 /gitlab/objects.py
parent261f9470f457673e8082e673fb09861a993fdabc (diff)
downloadgitlab-580f21ea9a80bfe7062296ac7684489d5375df69.tar.gz
Add support from listing group issues
Diffstat (limited to 'gitlab/objects.py')
-rw-r--r--gitlab/objects.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/gitlab/objects.py b/gitlab/objects.py
index ea9f9ab..315abde 100644
--- a/gitlab/objects.py
+++ b/gitlab/objects.py
@@ -679,6 +679,20 @@ class ApplicationSettingsManager(BaseManager):
obj_cls = ApplicationSettings
+class GroupIssue(GitlabObject):
+ _url = '/groups/%(group_id)s/issues'
+ canGet = 'from_list'
+ canCreate = False
+ canUpdate = False
+ canDelete = False
+ requiredUrlAttrs = ['group_id']
+ optionalListAttrs = ['state', 'labels', 'milestone', 'order_by', 'sort']
+
+
+class GroupIssueManager(BaseManager):
+ obj_cls = GroupIssue
+
+
class GroupMember(GitlabObject):
_url = '/groups/%(group_id)s/members'
canGet = 'from_list'
@@ -718,7 +732,8 @@ class Group(GitlabObject):
optionalUpdateAttrs = ['name', 'path', 'description', 'visibility_level']
shortPrintAttr = 'name'
managers = [('members', GroupMemberManager, [('group_id', 'id')]),
- ('projects', GroupProjectManager, [('group_id', 'id')])]
+ ('projects', GroupProjectManager, [('group_id', 'id')]),
+ ('issues', GroupIssueManager, [('group_id', 'id')])]
GUEST_ACCESS = 10
REPORTER_ACCESS = 20