GitLab API 获取特定分支的所有提交
问题描述:
默认情况下,API GET/projects/:id/repository/commits
获取 master 分支的提交,但我想获取其他分支的提交.
By default, the API GET /projects/:id/repository/commits
gets commits of master branch, but I want to get other branch's commits.
答
根据 Gitlab docs 您可以添加参数ref_name"并指定要从中获取提交的分支:
According to Gitlab docs you can add parameter "ref_name" and specify the branch from which you want to get the commits:
GET /projects/:id/repository/commits?ref_name=my_branch_name