gitlab api(v3)使用

前提

python-gitlab 1.4
gitlab使用v3接口

示例代码

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())

参考

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

猜你喜欢

转载自www.cnblogs.com/double12gzh/p/11403556.html