在Github上,我如何查找单个文件提交所属的拉取请求 [英] On Github, how do I find what pull requests individual file commits belong to
问题描述
在GitHub上,我可以看到 ... / commits / master / filename
下文件的提交历史记录。我想知道的是,假设这些更改通过合并请求合并到 master
中,Pull Request做了什么改变?有没有简单的方法来做到这一点?
自2014年10月13日起,应该会更容易:
< h2> ,就像 https://api.github.com/repos/hakimel/reveal.js/commits/f2097417daca80b2caaed2661ee646e861d789c8
将包含对PR的引用...
On GitHub, I can see the history of commits of a file under .../commits/master/filename
. What I want to know is, assuming these changes were merged into master
via Pull Requests, what Pull Request did the change come from? Is there an easy way to do that?
Since Oct. 13, 2014, this should be easier:
Linking merged pull requests from commits
We've been including the containing branches and tags on commit pages to give you more context around changes. Now, commits in a repository's default branch will also show you the pull request that introduced them.
In the pull request, you can see the discussion around why the commit was introduced, and get a clearer picture of the reason for the change.
As always, if you know the commit SHA, you can skip the commit page and search for the pull request directly.
For instance:
You can see for the file hakimel/reveal.js/plugin/markdown/markdown.js
, my contribution now comes with a reference to the PR #734 it originated.
Note however that:
- neither GitHub Get single commit API, like https://api.github.com/repos/hakimel/reveal.js/commits/f2097417daca80b2caaed2661ee646e861d789c8
- nor GitHub Get a commit API, like https://api.github.com/repos/hakimel/reveal.js/git/commits/f2097417daca80b2caaed2661ee646e861d789c8
will include the reference to the PR...
这篇关于在Github上,我如何查找单个文件提交所属的拉取请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!