Check backport workflow in danger CI
To ensure we backport everything as intended, I've introduced additional danger checks that should pass before merging. It also enforces a common workflow which makes it easier to track changes when doing gitlab archeology or pre-release checks.
New checks:
- Every MR marked as Backport needs to link to the original MR with "Backport of" message in its description
- The target branch has to be present in the MR title
- The original MR has to be merged first
- The use of
Backport
label now means a full backport. Every commit from original MR has to be referenced in one of the commits in the backport MR (typically through cherry-picked from X message) - A new label,
Backport::Partial
is introduced. This softens the previous checks and only notifies which of the original commits aren't referenced in the backport MR
I recognize the new workflow might be slightly annoying, but this really helps to clear up the repo and greatly increases clarity when doing archeology. As with any danger check, they can be ultimately ignored if they're wrong (please report those cases); but I hope the improved workflow gets adopted without much hassle.
Also, if you use Petr's backport helper, it takes care of almost all the required steps.
Edited by Nicki Křížek