您如何将新的拉取请求附加到 github 上的现有问题? [英] How do you attach a new pull request to an existing issue on github?

查看:25
本文介绍了您如何将新的拉取请求附加到 github 上的现有问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定,但我对创建带有问题 4"或标题中的其他内容的 github 拉取请求有模糊的记忆,并且它会自动将自己附加到我将其提交到的项目中的问题 4.我最近又试了一次,但没有用——它只是创建了一个全新的问题.我在新的拉取请求页面上看不到任何选项,例如附加到问题",也没有在问题页面上看到为此问题打开一个新的拉取请求".有没有办法做到这一点,以帮助项目所有者保持他们的问题页面干净并避免重复?

I'm not sure, but I have a vague memory of creating a github pull request with "Issue 4" or something in the title, and it automatically attached itself to Issue 4 in the project that I was submitting it to. I tried it again recently and it didn't work -- it just created a brand new issue instead. I don't see any options like "Attach to issue" on the new pull request page, nor "Open a new pull request for this issue" on the issue page. Is there any way to do this, to help project owners keep their Issues page clean and avoid duplication?

编辑:澄清一下,我知道创建拉取请求总是会产生一个问题.我想将拉取请求附加到现有问题.

Edit: To clarify, I know that creating a pull request always creates a new issue. I would like to instead attach the pull request to an existing issue.

推荐答案

hub"项目可以这样做:

The "hub" project can do this:

https://github.com/defunkt/hub

在您要从中发送拉取请求的存储库和分支中:

In the repository and branch that you want to send a pull request from:

$ hub pull-request -i 4

这使用 GitHub API,并将当前分支的拉取请求附加到现有问题编号 4.

This uses the GitHub API, and attaches a pull request for the current branch to the existing issue number 4.

@atomicules 的评论:要扩展@MichaelMior 的答案,一个完整的例子是:

Comment by @atomicules: To expand on the answer by @MichaelMior a full example is:

$ hub pull-request -i 4 -b USERNAME_OF_UPSTREAM_OWNER:UPSTREAM_BRANCH -h YOUR_USERNAME:YOUR_BRANCH URL_TO_ISSUE

这篇关于您如何将新的拉取请求附加到 github 上的现有问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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