Close a pull request and optionally leave a comment.

Section: Pull Requests Core

Close a PR

bash
bash
gh pr close 123 --comment "Superseded by #456"
Explanation

Close a pull request and optionally leave a comment.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Pull Requests Core
List pull requests
List open pull requests for the current repo.
OpenIn sheetbashsame section
List closed PRs
List pull requests by state.
OpenIn sheetbashsame section
View a PR
Show details for a pull request.
OpenIn sheetbashsame section
Create a PR interactively
Create a pull request.
OpenIn sheetbashsame section
Create PR with autofill
Autofill title and body from commits.
OpenIn sheetbashsame section
Create PR with explicit title/body
Create a pull request non-interactively.
OpenIn sheetbashsame section