node-gh / gh

(DEPRECATED) GitHub CLI made with NodeJS. Use the official https://cli.github.com/ instead.
http://nodegh.io
Other
1.71k stars 217 forks source link

Combine PR merge & rebase functionality into `gh pr --fetch` cmd #596

Closed protoEvangelion closed 5 years ago

protoEvangelion commented 5 years ago

Right now the gh pr --fetch --merge cmd will never call our merge handler because of this: https://github.com/node-gh/gh/blob/master/lib/cmds/pull-request.js\#L169

The merge handler only calls git cmds and does not perform a fetch (which is confusing because the docs suggest this is possible).

Ideally we would combine merge/rebase into the fetch cmd. From there, when you call gh pr --fetch, your three options would be:

  1. checkout
  2. rebase
  3. merge
protoEvangelion commented 5 years ago

related: #467