Nic*_*ers 11 git bitbucket git-patch pull-request
我在Bitbucket上有一个回购,只有我有写访问权限.
有人分叉了那个仓库,进行了更改,并从分支机构向我的仓库发出了拉动请求.
我怎样才能将拉取请求作为git补丁暂时应用于我的仓库以进行测试?
分叉回购是私有的,所以我不能把它拉下来,我也不想这样做.
在GitHub上,您只需转到拉取请求并在URL的末尾添加.patch即可下载补丁.这不适用于Bitbucket.
小智 20
Pull Request Patch可以通过bitbucket API获得(尽管没有按钮可以直接从Pull Request页面下载它).
访问Pull Request补丁:https://bitbucket.org/api/2.0/repositories/GROUP/PROJECT/pullrequests/ID/diff
来源:https: //bitbucket.org/site/master/issue/8323/add-link-for-raw-patch-to-pull-request-ui#comment-6590315
对于 7.x 版本,您可以根据https://docs.atlassian.com/bitbucket-server/rest/7.11.1/bitbucket-rest.wadl和https://docs.atlassian.com/中的信息尝试这些链接bitbucket-server/rest/7.11.1/bitbucket-git-rest.html:
拉取请求:https://bitbucket.example.com/rest/api/1.0/projects/GROUP/repos/PROJECT/pull-requests/ID.patch
提交:(https://bitbucket.example.com/rest/api/1.0/projects/GROUP/repos/PROJECT/patch?until=COMMIT
也since=
可以尝试使用查询参数作为起始提交)。