gitlab api (v3) using

premise

1.4-gitlab Python
gitlab interfaces using v3

Sample Code

import gitlab

host = 'http://xxxx.com'
project_id = "xxxx"
gl = gitlab.Gitlab(host, private_token="xxx", api_version='3')
p = gl.projects.get(project_id, lazy=True)
print(p.branches.list())

reference

https://github.com/python-gitlab/python-gitlab/issues/710

Guess you like

Origin www.cnblogs.com/double12gzh/p/11403556.html