Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Improving `pull-request` and other features of hub CLI tool #1

mislav opened this Issue May 7, 2013 · 10 comments


None yet
6 participants

mislav commented May 7, 2013

Not sure if this is appropriate for hack day, but here it goes:

I'm the maintainer of hub (repo), a wrapper for git on the command line which makes it better integrated with GitHub. You can use it to fork a repo, cherry-pick a GitHub URL, checkout a pull request URL, and create pull requests all without leaving the terminal.

There's a number of features that can be improved in hub, most important being the hub pull-request command and how it behaves in different cases. I want to make it more user-friendly.

I'd appreciate some help on hub, whether you would just discuss some semantics of different operations it encapsulates, or help me write Ruby code.

@mislav I used that gem in a majority of classes I teach that go beyond the basics. If any type of from-the-field discussion would be helpful, I'd love to participate in that way.

badboy commented May 7, 2013


esc commented May 8, 2013

You could echo back the message if the authorization fails. First time I tried it, I lost a message of a few paragraphs. Since the credentials are stored after you enter them once correctly, this is probably a rare use-case, but it is probably just a line of ruby, so it might be worth adding. I use the hub pull-request all the time and really like it.

mislav commented May 10, 2013

Here are some ideas for tomorrow's hack day. I welcome everyone's contributions, either by discussions, help triaging issues, or by writing Ruby code.


  • preserve pull request message body if the command fails for some reason (suggested by @esc above) defunkt/hub#178
  • avoid hard line breaks in pull request text defunkt/hub#318
  • ability to specify pull request body text via stdin/file contents defunkt/hub#183
  • automatically push to remote if not already done by user? defunkt/hub#165
  • incorrect branch assumed if current branch is not configured with tracking defunkt/hub#158
  • default branch (other than master) awareness defunkt/hub#154


Authentication / GH Enterprise

shell completion: bash / zsh

I'll start by taking a stab at defunkt/hub#178

stas commented May 11, 2013

Hey guys, there's some WIP on defunkt/hub#154 here stas/hub@0541e0994a615560515fc802a9f72d22752f440d
I would appreciate some second opinion on how it's done atm.

badboy commented May 11, 2013

Hey @stas, as the default branch is used in different commands, @mmozuras' approach looks cleaner: defunkt/hub#326

stas commented May 11, 2013

Thanks @badboy didn't know that. I guess we just need to add some tests to his pull-request.

mislav commented May 11, 2013

Just to keep everyone up-to-date: I'm handling the merge stuff listed above as well as avoiding hard line breaks when writing PR text in vim.

When writing tests, please update features/ directory and leave test/ alone. I've migrated most tests to Cucumber in the past months.

mislav commented May 12, 2013

Thanks everyone for your help yesterday! I've already merged some of the pulls, and I'm working to resolve other items soon. The new release will be very much awesome.

@mislav mislav closed this May 12, 2013

@fuadsaud fuadsaud referenced this issue in sorin-ionescu/prezto Jul 26, 2013


Fixed slow performance with `alias git=hub` #462

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment