gpt4 book ai didi

github - 在 Github 上,如何找到单个文件提交所属的拉取请求

转载 作者:行者123 更新时间:2023-12-03 17:49:10 24 4
gpt4 key购买 nike

在 GitHub 上,我可以在 .../commits/master/filename 下查看文件的提交历史记录。 .我想知道的是,假设这些更改已合并到 master通过拉取请求,更改来自什么拉取请求?有没有简单的方法来做到这一点?

最佳答案

自 2014 年 10 月 13 日起,这应该更容易:
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.


commit with PR reference in it!

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.



例如:
您可以看到文件 hakimel/reveal.js/plugin/markdown/markdown.js , my contribution现在带有对 PR #734 的引用它起源于。
PR from contrib

但请注意:
  • 都没有 GitHub Get single commit API , 喜欢 https://api.github.com/repos/hakimel/reveal.js/commits/f2097417daca80b2caaed2661ee646e861d789c8
  • 也不是 GitHub Get a commit API , 喜欢 https://api.github.com/repos/hakimel/reveal.js/git/commits/f2097417daca80b2caaed2661ee646e861d789c8

  • 将包括对 PR 的引用...

    关于github - 在 Github 上,如何找到单个文件提交所属的拉取请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25459110/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com