前提
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())
2024-01-09 11:54:04
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())