Apply Bitbucket pull request as a patch

怎甘沉沦 提交于 2019-12-21 07:26:17

问题


I've got a repo on Bitbucket that only I have write access to.

Someone forked that repo, made changes and issued a pull request to my repo from the fork.

How can I get that pull request as a git patch to apply temporarily to my repo for testing purposes?

The forked repo is private so I can't pull it down, and I wouldn't want to do that anyway.

On GitHub you can simply go to a pull request and add a .patch to the end of the url to download the patch. This doesn't work with Bitbucket.


回答1:


The Pull Request Patch is available through bitbucket API (despite there is no button to download it directly from the Pull Request page).

to access the Pull Request patch : https://bitbucket.org/api/2.0/repositories/GROUP/PROJECT/pullrequests/ID/diff

source: https://bitbucket.org/site/master/issue/8323/add-link-for-raw-patch-to-pull-request-ui#comment-6590315



来源:https://stackoverflow.com/questions/19456827/apply-bitbucket-pull-request-as-a-patch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!