Previously, re-issuing merge commands, only moved the approval index of a PR, essentially moving it up further into the queue. While the actual queue, and thus the git history stayed the same. Anything in the queue whose builds succeeded would then be merged, which contains the changes of the PR that moved back.
This fixes that by checking the integration status of a PR before handling the merge command. If the PR is found to be in progress, we do the same thing as a retry and simply redo everything.
Closes https://github.com/channable/hoff/issues/233.
Previously, re-issuing merge commands, only moved the approval index of a PR, essentially moving it up further into the queue. While the actual queue, and thus the git history stayed the same. Anything in the queue whose builds succeeded would then be merged, which contains the changes of the PR that moved back.
This fixes that by checking the integration status of a PR before handling the merge command. If the PR is found to be in progress, we do the same thing as a retry and simply redo everything.