-
Notifications
You must be signed in to change notification settings - Fork 8k
Open
Labels
coreThis issue is not accepting PRs from outside contributorsThis issue is not accepting PRs from outside contributorsenhancementa request to improve CLIa request to improve CLIgh-prrelating to the gh pr commandrelating to the gh pr command
Description
Describe the feature or problem you’d like to solve
We write scripts that wrap and extend gh pr create, but it is hard to do so correctly when gh pr create does not signal clearly if a PR was in fact created, or what the resulting PR number is. (We do not redirect stdio as we want to preserve the interactivity of gh.)
- If you select
Cancelingh pr create, the program will still exit with code 0, so it is very hard for the wrapper to tell whether a PR was created at all. - The PR created by
gh pr createis not stored/communicated, and the wrapper must rely on error-prone tricks, like callinggit pr list --limit=1to deduce which PR was created.
Proposed solution
gh pr createshould exit with a non-zero code when the PR creation is cancelled by the user.- Add an option or some other way for communicating the created PR number back to the caller. E.g.
--save-pr <path>to have the PR number written into a file of the caller's choosing?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
coreThis issue is not accepting PRs from outside contributorsThis issue is not accepting PRs from outside contributorsenhancementa request to improve CLIa request to improve CLIgh-prrelating to the gh pr commandrelating to the gh pr command