And if so, how?
We recently transitioned the codehealth pipeline from reporting via a Jenkins pipeline to a bot application on Toolforge that comments (and votes) based on the SonarQube quality gate result.
In the #wikimedia-codehealth channel, we agreed that the bot could leave a +1 CR if the quality gate passed, and a 0 (comment only) if it failed.
Alternatives would be:
- 0 (comment only) for pass or fail
- 0 (comment only) for pass and -1 for fail
- +1 verified for pass and 0 (comment only) for fail
As far as I can tell the "Verified" label is flexible to interpretation. The Gerrit docs say:
> The Verified label was originally invented by the Android Open Source Project to mean 'compiles, passes basic unit tests'. Some CI tools expect to use the Verified label to vote on a change after running.
And for +1 it says "Compiled (and ran tests) successfully." along with "Any +1 enables submit.". That seems a bit problematic but in theory if someone +2'ed something that was verified +1 by the bot but didn't pass the test pipeline, we'd still need the test pipeline to pass in gate-and-submit, so it would be safe enough.