在Github上,我如何查找单个文件提交所属的拉取请求 [英] On Github, how do I find what pull requests individual file commits belong to

查看:110
本文介绍了在Github上,我如何查找单个文件提交所属的拉取请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

解决方案

自2014年10月13日起,应该会更容易:
< h2> ,就像 https://api.github.com/repos/hakimel/reveal.js/commits/f2097417daca80b2caaed2661ee646e861d789c8

  • GitHub获取提交API ,如 https://api.github.com/repos/hakimel/reveal.js/git/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:

    will include the reference to the PR...

    这篇关于在Github上,我如何查找单个文件提交所属的拉取请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆