Can no longer merge a PR from a deleted fork #59472
Unanswered
smokhov
asked this question in
Pull Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Product Feedback
Body
Hi, reposting this from a personal ticket 2223464 at the recommendation of GitHub support. Mostly to share a workaround and for the GitHub Support, if such practice exists, update the SO answers to the new official behavior. I guess it's mostly a documentation issue now for scenarios like mine.
Original request:
Hi,
A PR I made from a user's repo has just been closed because the source repo was deleted,
but this is not an expected behaviour as far as I can tell from reading around.
The PR in question is:
NAG-DevOps/OpenCL-examples#3
The data and commits are still there, so I can trivially reproduce them:
https://github.com/NAG-DevOps/OpenCL-examples/pull/3/commits
but I'd rather merge it with a proper attribution. This is the first time I see such a behaviour
on GitHub. In the past it seems the target repo always had a copy in a hidden branch
that can be merged at any convenient time regardless if the fork is there or not.
Has this changed? What can I do about it since the data are still there?
On March 22, 2021 I had a case when the source repo of the PR was deleted, but the PR was still intact I and I was able to merge it:
OpenISS/OpenISS#62
Previous SO links about it:
None of this documentation I read describes this behaviour:
Thank you.
Reproduction Steps
My initial workaround:
I've found a workaround where I could recreate the local pull request from a branch instead using this as a reference:
So now have to do an extra step for closed PRs from deleted repos: fetch PR explicitly into a local branch; push the branch; create a new local PR with the original's PRs commits. More legwork for nothing, but works.
Recommendations from GitHub Support (extract):
...
Restoring the repo will allow the PR to be reopened. Note that in the typical case involving forks, this requires contacting GitHub Support.
You've presented a good workaround in scenarios where the repository can't be restored.
You can also recreate the PR on GitHub.com by viewing its history from the closed PR's head commit:
Then use the tree drop-down menu (the branch selector) to create a new branch from that history, and subsequently recreate the pull request. You might even reference the original PR by mentioning it in a comment.
...
Beta Was this translation helpful? Give feedback.
All reactions