From fbd2010e09f0412ea52cd16bb26cf988836bc03f Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Tue, 29 May 2018 06:42:16 +0200 Subject: Add support for group boards --- gitlab/v4/objects.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'gitlab/v4/objects.py') diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index e4c503f..65134db 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -523,6 +523,29 @@ class GroupAccessRequestManager(ListMixin, CreateMixin, DeleteMixin, _from_parent_attrs = {'group_id': 'id'} +class GroupBoardList(SaveMixin, ObjectDeleteMixin, RESTObject): + pass + + +class GroupBoardListManager(CRUDMixin, RESTManager): + _path = '/groups/%(group_id)s/boards/%(board_id)s/lists' + _obj_cls = GroupBoardList + _from_parent_attrs = {'group_id': 'group_id', + 'board_id': 'id'} + _create_attrs = (('label_id', ), tuple()) + _update_attrs = (('position', ), tuple()) + + +class GroupBoard(RESTObject): + _managers = (('lists', 'GroupBoardListManager'), ) + + +class GroupBoardManager(RetrieveMixin, RESTManager): + _path = '/groups/%(group_id)s/boards' + _obj_cls = GroupBoard + _from_parent_attrs = {'group_id': 'id'} + + class GroupCustomAttribute(ObjectDeleteMixin, RESTObject): _id_attr = 'key' @@ -691,6 +714,7 @@ class Group(SaveMixin, ObjectDeleteMixin, RESTObject): _short_print_attr = 'name' _managers = ( ('accessrequests', 'GroupAccessRequestManager'), + ('boards', 'GroupBoardManager'), ('customattributes', 'GroupCustomAttributeManager'), ('issues', 'GroupIssueManager'), ('members', 'GroupMemberManager'), -- cgit v1.2.1