Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcb5b754

Browse files
committed
Merge remote-tracking branch 'samcday/teams' into team-api
Conflicts:gitlab.py
2 parents8a22958 +5388d19 commitcb5b754

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

‎gitlab.py

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,20 @@ def User(self, id=None, **kwargs):
385385
"""
386386
returnself._getListOrObject(User,id,**kwargs)
387387

388+
defTeam(self,id=None,**kwargs):
389+
"""Creates/gets/lists team(s) known by the GitLab server.
390+
391+
If id is None, returns a list of teams.
392+
393+
If id is an integer, returns the matching project (or raise a
394+
GitlabGetError if not found)
395+
396+
If id is a dict, create a new object using attributes provided. The
397+
object is NOT saved on the server. Use the save() method on the object
398+
to write it on the server.
399+
"""
400+
returnself._getListOrObject(Team,id,**kwargs)
401+
388402

389403
classGitlabObject(object):
390404
_url=None
@@ -866,7 +880,7 @@ class TeamMember(GitlabObject):
866880

867881
classTeamProject(GitlabObject):
868882
_url='/user_teams/%(team_id)s/projects'
869-
_constructorTypes= {'owner':'User'}
883+
_constructorTypes= {'owner':'User','namespace':'Group'}
870884
canUpdate=False
871885
requiredCreateAttrs= ['team_id','project_id','greatest_access_level']
872886
requiredDeleteAttrs= ['team_id','project_id']
@@ -881,13 +895,12 @@ class Team(GitlabObject):
881895
requiredCreateAttrs= ['name','path']
882896
canUpdate=False
883897

884-
defMembers(self,id=None,**kwargs):
898+
defMember(self,id=None,**kwargs):
885899
returnself._getListOrObject(TeamMember,id,
886900
team_id=self.id,
887901
**kwargs)
888902

889-
defProjects(self,id=None,**kwargs):
903+
defProject(self,id=None,**kwargs):
890904
returnself._getListOrObject(TeamProject,id,
891905
team_id=self.id,
892906
**kwargs)
893-

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp