GitLab API 获取特定分支的所有提交 [英] GitLab API to get all commits of a specific branch
本文介绍了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
这篇关于GitLab API 获取特定分支的所有提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文