File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -47,28 +47,32 @@ gl = Gitlab('http://192.168.123.107', 'JVNSESs8EwWRx5yDxM5q')
4747# Connect to get the current user
4848gl.auth()
4949# Print the user informations
50- print gl.user
50+ print ( gl.user)
5151
5252# Get a list of projects
5353for p in gl.Project():
54- print (p.name)
54+ print (p.name)
5555 # get associated issues
5656 issues = p.Issue()
5757 for issue in issues:
5858 closed = 0 if not issue.closed else 1
59- print (" %d => %s (closed: %d )" % (issue.id, issue.title, closed))
59+ print (" %d => %s (closed: %d )" % (issue.id, issue.title, closed))
6060 # and close them all
6161 issue.state_event = " close"
6262 issue.save()
6363
6464# Get the first 10 groups (pagination)
6565for g in gl.Group(page = 1 , per_page = 10 ):
66- print (g)
66+ print (g)
67+
68+ # To use pagination and retrieve all the items
69+ for g in gl.Group(all = True ):
70+ print (g)
6771
6872# Create a new project (as another_user)
6973p = gl.Project({' name' : ' myCoolProject' , ' wiki_enabled' : False })
7074p.save(sudo = " another_user" )
71- print p
75+ print (p)
7276`````
7377
7478## Command line use
You can’t perform that action at this time.
0 commit comments