#856 Distinguish between rejected and manually merged PRs
Closed: Fixed 7 years ago Opened 8 years ago by mikem.

I often rebase PRs before I apply them. Sometimes I can get the request to rebase, but most often I don't have time for that and rebase and push myself. At this point, my only option is to close the PR.

The problem is that there is no clear way to distinguish between a PR that was closed because it was rejected and a PR that was closed because it was manually merged.


Note that Pagure supports closing a PR with the comment in a commit.

You could just add a line "Fixes #<PRnum>", and it will close the PR with status=merged, pointing to the specific commit.

But yeah, this is quite annoying, and it would be great if there would be a button to say "I merged this" to close as merged..

So, to use the existing feature, I'd have to add an extra commit for each merge? Can I do more than one in a commit message if I'm dealing with a batch of PRs?

So currently, if the branch that is proposed to be merged is the same as the merged-into branch, then we see the following message in the top right (where the merge button appears)

alreadymerged.png

I think we could also add a button here to be able to Close or Mark as fixed here.

For the mark as fixed option, we should also ask the merger what commits were part of this PR, let them manully select one or more commits from the current tree and show them in the UI of the PR for tracking purposes. <-- '''Not sure about this idea would love feedback on that :)'''

So, to use the existing feature, I'd have to add an extra commit for each merge?

Either add an extra commit, or add the line to the last commit that you merge or in the merge commit if you use those.

Can I do more than one in a commit message if I'm dealing with a batch of PRs?

You should be able to close multiple PRs in on commit message (Fixes #x \n Fixes #y \n Fixes #z \n ...)

How does Pagure determine whether I mean an issue or a PR? If I didn't know otherwise, I'd assume "Fixes #x" refers to the issue instead of the PR. I mean, you fix issues. PRs themselves aren't really things that get fixed.

So the numbering for issues and requests is share:

  • open a ticket, id : 1
  • open a PR, id: 2
  • open a ticket, id: 3

and so on

So #<id> is not a problem since within a project it's unique.

Also, @puiterwijk has added support for using the keywords Merge ( https://pagure.io/pagure/pull-request/910 ) to close a ticket or a PR as indeed, PRs don't really get fixed.

We also added support for the keyword Close ( https://pagure.io/pagure/pull-request/1152 ) to mark PR and tickets as fixed/closed via a commit message.

I'm going to close this ticket as fixed.

Let's re-open it or open a new one if there are more improvements to do :)

Thanks all!

@pingou changed the status to Fixed

7 years ago

Login to comment on this ticket.

Metadata
Attachments 1
Attached 7 years ago View Comment