owenthereal / gh

Fast GitHub command line client (deprecated). gh has been merged into https://github.com/github/hub, see https://github.com/github/hub/issues/475 for more info
MIT License
718 stars 48 forks source link

Don't attach issue to pull request, refer it instead #193

Open owenthereal opened 10 years ago

owenthereal commented 10 years ago

With the new changes on API, it's not recommended to attach a PR to an issue. It's recommended to refer to an issue instead. One solution is to create a pull request and refer to an issue in the pull request.

$ gh pull-request -i 123
creates a pull request (don't use the attach issue API since it'll convert an issue to a PR)
posts a message to issue 123, e.g. pull request 456 has been created

/cc @calavera @technoweenie @mislav

calavera commented 10 years ago

:+1:

We can create the title and description based on the issue referenced.

mislav commented 10 years ago

Yep, you could prefill the PR body with Fixes #XYZ. This gives the user an option to edit the message, and lets GitHub handle the issue references (i.e. you don't have to manually post a comment to issue XYZ)