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

posted @ 2019-08-24 09:17  大海星  阅读(2757)  评论(0编辑  收藏  举报