smarkets / marge-bot

A merge-bot for GitLab
BSD 3-Clause "New" or "Revised" License
701 stars 136 forks source link

Monitor MR assignment while waiting for a Pipeline #238

Open alatiera opened 5 years ago

alatiera commented 5 years ago

Scenario: This is slight micro-managment of the queue, but its necessary for projects with multiple concurrent MRs.

  1. assign MR 1 to merge bot
  2. assign MR 2 to merge bot (ready to go and be merged, ci is all green)
  3. unassign issue 1 (whose ci pipeline hasn't even started yet)

Currently:

  1. nothing happens, merge bot is waiting for the CI on MR 1 to finish and then continues without checking assignment

Desired:

  1. Merge bot notices the assignment and continues with its Queue quietly

I am guessing currently the merge bot blocks until it receives a callback about the CI status of the MR its tracking, but it would be handy to also check in between if its still assigned to that MR. Am I on the right track here?

Additionally, this could be used for new discussions that might pop-up, Maintainer A assigns the bot, but Maintainer B notices something that will need to be changed slightly after.