I set up a bunch of .gitar/rules with type: check. They are correctly passing and failing things. But I can’t seem to get gitar to not auto-approve an MR if those check. This is in Gitlab.
I’ve tried putting text in .gitar/approved that says things like “Don’t approve if a rule fails” or “Read .gitar/rules and verify them”. I also tried putting in a rule a comment “If this check fails, do not approve”. But gitar continues to auto-approve the MR.
How do I get the rule checks to prevent auto approval?
Sorry. I had mistyped. I was using .gitar/config/approve.md. Here’s the variations that I tried (For some of these, it just prevented auto-approval completely because gitar said it couldn’t find the rules or didn’t know if the rules passed or not.):
Do not approve if any repository rule in the Verification section failed. Every rule must be met or not applicable before approval.
–
Before approving, read every rule file in .gitar/rules/ and check the PR’s added and modified lines against each one whose when matches the PR. Do not approve if any added or modified line breaks one of those rules.
--
Do not approve if any Gitar rule evaluation for this PR reported a failure, or if rule results are missing.
Hey @trichins, thanks for confirming, in that case I’m going to flag this for the team to see if they can provide any insight about this. In the meantime, could you please share your organization’s name?