#1968 pull request against empty repo cannot be merged
Closed: Won't Fix a year ago by wombelix. Opened 7 years ago by dcallagh.

Maybe an edge case that doesn't come up very often... But for https://pagure.io/waiverdb we started from an empty repo (no branches or commits). I filed a pull request, and instead of offering me to merge it Pagure just showed an error message saying that origin/master does not exist. (Sorry I didn't copy the exact wording of the error message and it's gone now.)

It would be nice if Pagure could "merge" the pull request by just creating a new master branch with the commit.

Also, after I manually pushed the commit, Pagure didn't notice that the PR was effectively "merged". Instead it stayed open with 0 commits and I had to reject it instead.


Yeah pagure is lost when the target repo is empty, it doesn't know where you want to merge (master? develop? something else?)

For the record, the PR was: https://pagure.io/waiverdb/pull-request/1

(which is now showing a 500 error hm....)

Oh yeah that's a fair point about the branch... But how does it ever know which branch a PR should be merged to?

I assumed it was always just merging to the default branch configured in the repo's settings. And in our case that would be reasonable (default is master). So maybe it could use that?

Also, after I manually pushed the commit, Pagure didn't notice that the PR was effectively "merged". Instead it stayed open with 0 commits and I had to reject it instead.

This is known: https://pagure.io/pagure/issue/1683

My solution would be to edit the last commit message and add the Merges #<id>

I assumed it was always just merging to the default branch configured in the repo's settings. And in our case that would be reasonable (default is master). So maybe it could use that?

Yeah, it should do that :)

no update / progress in 5 years, does seem to be kinda edge case though, closing it for now, if necessary we can re-open the issue at a later point if it's still relevant to work on it.

Metadata Update from @wombelix:
- Issue close_status updated to: Won't Fix
- Issue status updated to: Closed (was: Open)

a year ago

Login to comment on this ticket.

Metadata