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

Use default repository branch for sending pull requests #449

Closed mdelapenya closed 6 years ago

mdelapenya commented 8 years ago

I'd like to send any pull request to a repository's default branch, instead of always master. There are some teams using a dev or development branch, and they always have to add the -b branch parameter, which sometimes they/we forget.

Github repositories API has a default_branch element, that could be used to trigger the current PR, could the project use that element to send the pull request against it?

Or could it be configured in a local configuration?

Thanks!

stguitar commented 6 years ago

@mdelapenya sorry to comment on something old, but I need this too. Isnt that what the "default_branch" setting in the local config file is used for?

mdelapenya commented 6 years ago

Is it possible to define it per repository? Or is it a single value?

stguitar commented 6 years ago

my use case is more globally applicable, however, according to the docs, you can create a .gh.json file in the projects themselves, which can be used to override any global settings.

mdelapenya commented 6 years ago

Closing, as per @stguitar comment. Thanks!!

image