How do you attach a new pull request to an existing issue on github?

前端 未结 10 1930
抹茶落季
抹茶落季 2020-12-04 04:40

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

10条回答
  •  余生分开走
    2020-12-04 04:54

    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
    

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


    EDIT: 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
    

提交回复
热议问题