#2694 Bail on merge a PR that is already closed
Merged by pingou. Opened by pingou.
bail_closed_pr  into  master

Download 2694.patch

It happened at least once that two persons requested to merge a PR at
the same time, leading to two comments being added to the PR about it
being merge (by each individual) while the task for the second person
actually failed (because there was nothing to change).

With this change, we're waiting for the last moment and checking if the
PR has been merged/closed and if so, we bail.

Fixes https://pagure.io/pagure/issue/2686

logging should involve the id of PR, no?

It should already be mentioned above, that's also why there is two empty spaces in front of the line to make it more easily readable in the logs.

LGTM

Thanks for the reviews :)

rebased onto 99d49393c9742a278c670e57f2386f5ab7c7865b

Pull-Request has been merged by pingou

Metadata