Github API:查找未标记的提交 [英] Github API: Finding untagged commits
问题描述
是否有可能从使用Github API的最新版本中找到所有未标记的提交? 首先,您可以获取使用GitHub API 最新版本(与matest tag)
GET / repos /:所有者/:回购/发行版/最新版
这意味着您可以比较两个提交:
GET / repos /:owner /:repo /比较/:base ...:head
例如: https://api.github.com/repos/git- for-windows / git / compare / v2.4.5.windows.1 ... master
注释:
-
请参阅处理大比较:
lockquote
响应将包含多达250个提交的比较。
如果您正在使用更大的提交范围,则可以使用提交列表API 列举范围内的所有提交。
-
假设您的发布是在
master
分支上完成的(但是您的可以在另一个分支上创建一个版本)
Is it possible to find all untagged commits since the latest release using Github API?
First, you can get the latest release with the GitHub API (which matches the matest tag)
GET /repos/:owner/:repo/releases/latest
That means you can then compare two commits:
GET /repos/:owner/:repo/compare/:base...:head
For example: https://api.github.com/repos/git-for-windows/git/compare/v2.4.5.windows.1...master
Notes:
See Working with large comparisons:
The response will include a comparison of up to 250 commits.
If you are working with a larger commit range, you can use the Commit List API to enumerate all commits in the range.This assume your release was done on the
master
branch (but you can create a release on another branch)
这篇关于Github API:查找未标记的提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!