git-extras icon indicating copy to clipboard operation
git-extras copied to clipboard

Make `pull-request` command work like GitHub interface

Open blakeembrey opened this issue 8 years ago • 2 comments

The one thing I really like about the GitHub UI here is that when there's only one commit, it'll automatically pull out the title and contents from it. When there's more than one, it defaults to the title-cased string of the branch name.

blakeembrey avatar Sep 21 '15 21:09 blakeembrey

I think this is a good idea, but only if it occurs when a title is not supplied.

Only issue is that it isn't possible to check if a title is already supplied due to the order in which the info for the PR is supplied because we would never know if the title (1st parameter) was not supplied or if the base (fourth parameter) was not supplied.

The only solution I can think of is making the title the last ($4) parameter; however, that would change the API and would be unnatural, IMO.

I'll leave this open if anyone else has a solution.

qw3rtman avatar Oct 18 '15 08:10 qw3rtman

The way the hub command addresses this is with command flags instead of arguments, e.g. -b denotes the base branch for the PR, -h denotes the head. Combined with opening the PR title and message in my editor and understanding a convenient (if arcane) shorthand for remote:branch, I typically use hub pull-request (aliased as gpr) to open PRs from the CLI instead. Adding similar functionality to extras would be desirable.

al-the-x avatar Dec 01 '15 16:12 al-the-x