How can Pull Requests (PRs) in B/X, created originally as PRs in A/X from branches in B/X, be re-attached to branches in B/X after repository B/X was deleted and A/X including PRs was transferred to B/X? Consider the following steps, where A and B are both personal accounts and X is a repository that was originally created as A/X:

  1. B creates fork B/X from A/X.
  2. B open PRs in A/X, based on branches in B/X;
  3. B deletes B/X (in preparation for migration);
  4. A/X gets moved to B/X;
  5. B pushes all branches corresponding to PRs back to B/X.

Now, B/X contains numerous PRs and numerous branches. Each PR has a corresponding branch, but due to the deletion of the original B/X, the PRs (moved from A/X) all show from unknown repository; although unknown repository actually is a hyperlink to the correct branch on Github, the issue cannot be reopened — the reopen button is greyed out, and hovering the mouse over it yields the message "The repository that submitted this pull request has been deleted".

How can I convince Github that those PRs should be linked to the branches that are back in the same place where they were when the PR was originally created?


I have contacted Github Support with the same question (except specifically naming the accounts and repositories).

1 Answers

gerrit On Best Solutions

It is not possible.

The answer from GitHub support:

This is something we cannot undo. Once you delete the branch the link is broken and we cannot link it back. We apologize for any inconvenience this may cause and we will investigate this further to improve on this in the future.