#2492 keep pull request if reference repo is deleted
Closed: Fixed Opened by carlwgeorge.

I came across some unexpected behavior with pagure pull requests. After my PR was merged, I deleted my fork. If you do this on GitHub, the PR (with comments) is still accessible, and the reference repo is show as "unknown" (example). I expected the same behavior with pagure, but instead my PR is no longer accessible.


Metadata Update from @pingou:
- Issue tagged with: bug

Not only that. If the repo is deleted before the pull request is closed, it's still visible in the list of PRs, but the link doesn't work. So it's left hanging there and we can't even remove it.

For example, under https://pagure.io/taskotron/libtaskotron/pull-requests we see:

PR#396 do not ask user to input yes when using unknown hosts  
PR#395 do not remove the vm when no-destroy is specified

But the links don't work:
https://pagure.io/taskotron/libtaskotron/pull-request/396
https://pagure.io/taskotron/libtaskotron/pull-request/395

@pingou, this is a critical issue. We need to be able to remove old PRs, and we need to be able to access comments we provided to them.

I'm facing the same issue, even when just the branch is deleted from the fork.

Replicating this it seems that the PR is entirely removed from the DB when the fork is deleted, I'll see if I can improve this.

I'm facing the same issue, even when just the branch is deleted from the fork.

That's a different issue though, the PR is not accessible but you get an error message while if the fork is entirely gone the PR is also removed from the DB

Metadata Update from @pingou:
- Issue assigned to pingou

Both issues have been addressed in https://pagure.io/pagure/pull-request/2598

Commit ff983217 fixes this issue

If you tell us once the new version is deployed, I can verify whether it fixed the problem for us.

Will do :)

Metadata