#1358 pull requests for forks broken ?
Closed: Fixed 7 years ago Opened 7 years ago by mikem.

I visited a fork of koji and tried to submit a (remote) pull request against a branch there.

fork: https://pagure.io/fork/imcleod/koji/branch/feature/runroot-newchroot-option

Everything looked ok until the final submit, at which point I got a 500 error. The result is a pull request against the original project that cannot be viewed. E.g.

https://pagure.io/koji/pull-request/165


I think the reason the PR page does not load is that the branch field refers to a branch that does not exist

@pingou can tell you in more details , but what I know is we no longer provide issue tracker and pull-request from one fork to another , so probably that fork is created when we use to have these enabled AFAIK.

The second problem is a genuine problem , I would like to know the exact steps to replicate it on my system :)

@mikem, seeing the logs you are right, the remote PR is open against a branch that does not exist.

@farhaan, PRs in forks are disabled by default, that doesn't mean people can't turn them back on. So remote PR to a fork are valid if the fork enabled PRs.

the branch names had a slashes in them (both from and to), in case that could be contributing

Ok, so I fixed https://pagure.io/koji/pull-request/165 and https://pagure.io/koji/pull-request/164

The root cause was that the branch specified in the DB was feature/runroot-newchroot-option which exist in the fork but not in the target repo, so I updated the DB to make the branch be master for both PRs.

Now we need to figure out why it got this way :(

Ok, so as from https://pagure.io/pagure/pull-request/1720 we will inform the user that the target branch of the PR does not exist (either because the PR was incorrectly created (outside the UI), or because the target branch has been removed from the repo).

This means: the PR will not be accessible (we cannot compute its diff) and will remain open. The fix is then to (re-)create the target branch in the repo, allowing the diff to be computer and the PR to be shown (and thus be closed/merged).

Since we're already preventing creating a pull-request against a branch that does not exist, I believe #1720 should actually fix the present ticket (maybe with a small blob in the documentation, I'll add it to #1720).

Commit 5e3931c relates to this ticket

@pingou changed the status to Closed

7 years ago

Login to comment on this ticket.

Metadata