应用Bitbucket拉取请求作为补丁 [英] Apply Bitbucket pull request as a patch

查看:143
本文介绍了应用Bitbucket拉取请求作为补丁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Bitbucket上有一个回购协议,只有我有权写.

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.

我如何才能以git补丁的形式获取拉取请求,以临时将其应用于我的存储库以进行测试?

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.

在GitHub上,您可以简单地转到请求请求,并在URL的末尾添加.patch来下载补丁.这不适用于Bitbucket.

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.

推荐答案

可通过bitbucket API获得拉取请求补丁"(尽管没有按钮可直接从拉取请求"页面下载).

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

访问请求请求补丁: https://bitbucket.org/api/2.0/repositories/GROUP/PROJECT/pullrequests/ID/diff

来源: 查看全文

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