Skip to content

Commit 8e9171c

Browse files
author
Adrien "ze" Urban
committed
gitlab: some path/names updates
1 parent 611fc1d commit 8e9171c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

gitlab.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,7 @@ class GroupMember(GitlabObject):
658658
canGet = False
659659
canUpdate = False
660660
requiredCreateAttrs = ['group_id', 'user_id', 'access_level']
661+
requiredListAttrs = ['group_id']
661662
requiredDeleteAttrs = ['group_id', 'user_id']
662663
shortPrintAttr = 'username'
663664

@@ -766,6 +767,7 @@ class ProjectKey(GitlabObject):
766767
requiredListAttrs = ['project_id']
767768
requiredGetAttrs = ['project_id']
768769
requiredCreateAttrs = ['project_id', 'title', 'key']
770+
shortPrintAttr = 'title'
769771

770772

771773
class ProjectEvent(GitlabObject):
@@ -941,7 +943,7 @@ class Project(GitlabObject):
941943
'merge_requests_enabled', 'wiki_enabled',
942944
'snippets_enabled', 'public', 'visibility_level',
943945
'namespace_id', 'description']
944-
shortPrintAttr = 'path'
946+
shortPrintAttr = 'path_with_namespace'
945947

946948
def Branch(self, id=None, **kwargs):
947949
return self._getListOrObject(ProjectBranch, id,
@@ -1062,7 +1064,7 @@ def delete_file(self, path, branch, message):
10621064

10631065

10641066
class TeamMember(GitlabObject):
1065-
_url = '/user_teams/%(team_id)s/members'
1067+
_url = '/groups/%(team_id)s/members'
10661068
canUpdate = False
10671069
requiredCreateAttrs = ['team_id', 'user_id', 'access_level']
10681070
requiredDeleteAttrs = ['team_id']
@@ -1072,7 +1074,7 @@ class TeamMember(GitlabObject):
10721074

10731075

10741076
class TeamProject(GitlabObject):
1075-
_url = '/user_teams/%(team_id)s/projects'
1077+
_url = '/groups/%(team_id)s'
10761078
_constructorTypes = {'owner': 'User', 'namespace': 'Group'}
10771079
canUpdate = False
10781080
requiredCreateAttrs = ['team_id', 'project_id', 'greatest_access_level']
@@ -1083,7 +1085,7 @@ class TeamProject(GitlabObject):
10831085

10841086

10851087
class Team(GitlabObject):
1086-
_url = '/user_teams'
1088+
_url = '/groups'
10871089
shortPrintAttr = 'name'
10881090
requiredCreateAttrs = ['name', 'path']
10891091
canUpdate = False

0 commit comments

Comments
 (0)