-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Labels
bugSomething isn't workingSomething isn't workingneeds-user-inputMore info needed from user/contributorMore info needed from user/contributor
Description
Describe the feature or problem you’d like to solve
At my job we rely on private GitHub repositories to house our code and each change goes in through a pull request. Unfortunately, when I run gh pr create, the CLI will by default always attempt to fork the repository, push to it, and then create a pull request. This particular operation fails with cannot fork private repository, which seems to be expected behavior.
Proposed solution
Add a flag to gh pr create, maybe called --no-fork (?) that would instead push to the current 'origin' remote and create a PR off it.
Additional context
So far I've been working around this with an alias that runs git push origin --set-upstream $(git rev-parse --abbrev-ref HEAD) before gh pr create which seems to 'work' but if there's a possiblity to teach gh to not fork it'd be really awesome :)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneeds-user-inputMore info needed from user/contributorMore info needed from user/contributor