Skip to content

Make gh pr edit able to change the base branch #3013

@zackcornelius

Description

@zackcornelius

Describe the feature or problem you’d like to solve

We're able to change the base branch of a PR with the web UI, and the API, just not with gh. Would like to add a --base flag to gh pr edit

Proposed solution

Add --base flag to gh pr edit, which uses the base field on the PATCH call for the PR

Additional context

https://docs.github.com/en/rest/reference/pulls#update-a-pull-request documents the base field on the PR update call

Metadata

Metadata

Assignees

Labels

enhancementa request to improve CLIhelp wantedContributions welcome

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions