GitHub: a pull request cannot be closed or reopened
A pull request is closed without merging with Close pull request, at the bottom of the pull request below the comment box (GitHub's closing a pull request, checked October 27, 2026), and in the REST API by setting its state to closed or open. In an organization's repository, closing and reopening all issues and pull requests takes the triage role or higher. A pull request whose repository or conversation is archived, or that sits in a stack, has rules of its own.
PATCH /repos/OWNER/REPO/pulls/NUMBER {"state": "closed"}
PATCH /repos/OWNER/REPO/pulls/NUMBER {"state": "open"}
200 OK | 403 Forbidden | 422 Validation failed
Why it is not closed or reopened
- The role: "Close, reopen, and assign all issues and pull requests" is in the triage, write, maintain and admin roles of an organization's repository, not in read (GitHub's repository roles for an organization). In a repository owned by a personal account, collaborators can create, merge, and close pull requests (permission levels for a personal account repository).
- The REST answers:
PATCH /repos/OWNER/REPO/pulls/NUMBERtakesstateasopenorclosedand answers 200, 403 (forbidden), or 422 when validation failed or the endpoint has been spammed. Its documentation adds that opening or updating a pull request in a public repository takes write access to the head or the source branch, and that for a repository owned by an organization you must be a member of that organization (GitHub's update a pull request). - An archived repository: its issues, pull requests, comments and the rest become read-only for all users. To change anything, the repository has to be unarchived first (GitHub's archiving repositories).
- An archived pull request: archiving closes it and makes its conversation read-only. Unarchiving makes it visible again, but it remains closed: reopen it separately. Only people with triage access or higher see it, and others get 404 (GitHub's archive pull requests).
- A stack: closing a pull request in the middle of a stack blocks all pull requests above it from being mergeable. The stack relationship is kept, so to open a different pull request or change the structure of the stack, dissolve the stack first and then re-create it; unstacking removes only the open, draft and closed pull requests (GitHub's troubleshooting stacked pull requests).
What closes a pull request without Close pull request
- Deleting its branch: when a branch is used by at least one open pull request, deleting the branch closes those pull requests, after a warning (GitHub's managing branches within your repository).
- A closing keyword: a keyword that references a pull request comment in another pull request links the two, and merging the referencing pull request also closes the referenced one (GitHub's linking a pull request to an issue). See closing keywords.
- A Dependabot command:
@dependabot ignore this dependency, or this major, minor or patch version, closes the pull request and stops Dependabot from opening more for it, unless you reopen the pull request or upgrade yourself (GitHub's Dependabot pull request comment commands).
What to do
- A wrong base branch: change the base branch instead of closing the pull request and opening a new one, as the closing page suggests. See changing the base branch.
- Find it:
is:closed is:unmergedfinds pull requests closed without being merged, andis:archivedfinds archived ones for people with triage access or higher (GitHub's searching issues and pull requests). - Its branch: on a closed pull request, Delete branch near the bottom removes the branch when no other open pull request uses it, and Restore branch brings back the head branch. See branch not deleted.
- Ask for the role: in an organization's repository, triage is the least role that closes and reopens every pull request.
In IntelliJ IDEA: Close and Reopen follow the permission GitHub reported when the IDE connected
How the GitHub support built into IntelliJ IDEA closes and reopens a pull request, in its source (checked October 31, 2026; IntelliJ IDEA: GHPRDetailsActionsComponentFactory.kt, CodeReviewDetailsActionsComponentFactory.kt, GHPRCloseAction.kt, GHPRReviewFlowViewModelImpl.kt, GHPRDetailsServiceImpl.kt):
- Where the buttons are: on an open pull request, Close Pull Request is in the more-actions menu; on a closed one, the only button is Reopen Pull Request. A draft shows neither, only Post Pull Request (see draft, ready for review or close was refused).
- Who gets them: only the author of the pull request or an account with Triage permission or above, as GitHub reported it when the IDE connected to the repository.
- What it sends: the REST
PATCHabove withstateset toclosedoropen. - When GitHub refuses, nothing appears on screen: the source writes the error to the IDE's log, where showing it is marked as still to do. The pull request is then loaded again, so the buttons follow its state on GitHub.
GitHub pull requests in IntelliJ IDEA
Pull Request Inbox for GitHub, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, shows a pull request's reviews, checks and conversations next to the diff, and merges it with the methods the target branch allows. Close asks first and says the pull request can be reopened on GitHub, and for a pull request in a stack, that while one in the middle of a stack is closed, none of the pull requests above it can be merged; its list shows open pull requests, so a closed one leaves it, and you reopen it on the pull request's page on GitHub. The review inbox, diffs and conversations are free; approving, commenting, resolving, merging and closing are Pro (US$1.50 a month, with a 30-day trial).
GitHub is a trademark of GitHub, Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by GitHub, Inc. or JetBrains.
More: GitHub merge refused (405, 409) · GitHub review refused (422) · GitHub search 422 "Validation Failed" · "Resource not accessible by personal access token" · 401 "Bad credentials" · "Resource protected by organization SAML enforcement" · "API rate limit exceeded" · GitHub diff 406 "too_large", 3,000 files · GitHub line comment 422 "must be part of the diff" · GitHub branch update refused (422) · GitHub pull request not created (422, 403) · GitHub auto-merge refused · GitHub draft, ready for review or close refused · GitHub conversation not resolved · GitHub checks not shown (check runs 403) · GitHub file contents not read · GitHub compare refused (404, 422) · GitHub comment or reply refused (403 locked, archived) · GitHub merge method not allowed (405) · GitHub branch not found (404, 301) · GitHub Enterprise Server not reached · GitHub review request not shown · GitHub pull request list incomplete · GitHub 404 Not Found, renamed repositories (301, 307) · GitHub line comment outdated or not on the diff · GitHub pull requests not updating, notifications late · GitHub suggested change cannot be applied · GitHub required check stuck at "Expected" · GitHub code owner review required · GitHub merge blocked by unresolved conversations · GitHub merge blocked by unsigned commits · GitHub branch that merges through a merge queue · GitHub merge waiting for an approval of the most recent push · GitHub merge waiting for code scanning results · GitHub merge waiting for code quality results · GitHub merge blocked by a code coverage threshold · GitHub merge blocked by license compliance results · GitHub branch locked or its updates restricted · GitHub branch not deleted after merging · GitHub merge waiting for a team's approval (Required reviewers) · GitHub merge blocked by secret scanning alerts · GitHub stacked pull request not merging · GitHub push blocked by push rules · GitHub merge blocked by commit metadata rules · GitHub force push blocked · GitHub issue not closed by a merged pull request · GitHub pull request not checked out locally · GitHub pull request has merge conflicts · GitHub changes requested and dismissing a review · GitHub co-author not credited for a commit · GitHub dependency review check failed · GitHub Dependabot not rebasing its pull request · GitHub fork not syncing with upstream · GitHub pull request base branch not changing · GitHub pull request not reverting · GitHub pull request template not showing · GitHub pull request labels or assignees not added · GitHub push blocked by push protection · GitHub pull request comment hidden · GitHub pull request blocked until deployments succeed · GitHub team review request replaced by members · GitHub pull request file no longer marked Viewed · GitHub pull request marked merged without being merged · GitHub Copilot review does not count as an approval · GitHub checks not running on a pull request a workflow created · GitHub Update branch button not shown on a pull request · GitHub checks failing on a Dependabot pull request · GitHub checks failing on a pull request from a fork · GitHub checks skipped by [skip ci] in a commit message · GitHub checks gone after the retention period · GitHub code review limits in a public repository · GitHub pull requests turned off or limited in a repository · GitHub checks run on every pull request in a stack · GitHub pull request showing commits already squash merged · GitHub pull request not showing a file diff · GitHub push to a pull request branch from a fork refused · GitHub check cancelled on a pull request · GitHub Rebase and merge not available · GitHub merge commit message not what you expected · GitHub pull request shows every line changed · GitHub API request timed out · GitHub pull request image or document diff not shown · GitHub review request refused (422) · GitHub pull request from Copilot: checks not running, approval not counted · GitHub push refused: GH006 and GH013 on a protected branch · GitHub "At least 1 approving review is required", approvals that do not count · GitHub pull request plugins for IntelliJ IDEA, compared · 日本語