Skip to content

Instantly share code, notes, and snippets.

@Farhan-Haseeb
Created June 17, 2020 16:51
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Farhan-Haseeb/fd4cbb476de4e2931c322d7bacb75e5f to your computer and use it in GitHub Desktop.
Save Farhan-Haseeb/fd4cbb476de4e2931c322d7bacb75e5f to your computer and use it in GitHub Desktop.
How to reopen a closed PR on Github
How to reopen a pull-request from github?
Precodinitions
You need the rights to reopen pull requests on the repository.
The pull request hasn't been merged, just closed.
Go to Pull requests add filter `is:closed` choose PR you want to reopen. Select from checkbox and mark as Open.
@om4james
Copy link

Thank you, this worked well for me :)

@devinrhode2
Copy link

This doesn't seem to work if the branch was deleted

I re-published a branch, and this method is not working.

So technically github has a bug. What appears to be working, is not actually working.

@Farhan-Haseeb
Copy link
Author

The PR and Branch are separate entities. The PR is just what was and what is between parent -> child.

Republishing a branch won't won't open a PR. If its not merged you have to reopen it explicitly:
Screenshot 2022-09-26 at 5 32 41 PM
Screenshot 2022-09-26 at 5 31 39 PM

@mikehac
Copy link

mikehac commented Oct 10, 2022

Why the "Reopen pull request" button is disable even after you write something in the comment?

@mikehac
Copy link

mikehac commented Oct 10, 2022

"You need the rights to reopen pull requests on the repository."
How to do it?

@devinrhode2
Copy link

devinrhode2 commented Oct 10, 2022 via email

@UbdaNam
Copy link

UbdaNam commented Mar 23, 2023

If you changed the branch name or deleted the branch, the reopen pull request button will be disabled so first you need to click the restore branch button in the right section of your commit ( change branch name / delete branch commit) inside your pull request then the reopen button will be enabled

@killerburn69
Copy link

nicr

@TiffLSmith
Copy link

If you changed the branch name or deleted the branch, the reopen pull request button will be disabled so first you need to click the restore branch button in the right section of your commit ( change branch name / delete branch commit) inside your pull request then the reopen button will be enabled

Thanks for this info!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment