Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show that the overrideIf of a configured Code-Owners SR has no effect
Whether a change is code-owner approved is checked by the (hard-coded) code owners submit rule. This submit rule respects overrides that comply with the label that is configured as override in the code-owners plugin configuration. If a Code-Owners submit requirement is manually configured in project.config it conflicts with the (hard-coded) code owners submit rule. If submit requirements conflict the change only gets submittable when both submit requirements pass. This means if the Code-Owners submit requirement has a different overrideIf condition than what's configured in the code-owners plugin configuration it has no effect: 1. If the overrideIf is satisfied it doesn't count as an override for the (hard-coded) code owners submit rule so this submit rule is still not passing and hence the change doesn't get submittable. 2. If the override that is configured in the code-owners plugin configuration is satisfied the (hard-coded) code owners submit rule is passing. If the Code-Owners submit requirement uses "has:approval_code-owners" as submittableIf condition it is passing now too since "has:approval_code-owners" just means to check if the (hard-coded) code owners submit rule passes. This means the overrideIf condition of a configured Code-Owners submit requirement can neither replace nor add to the override condition that is configured in the code-owners plugin configuration. This also means defining a Code-Owners submit requirement that has an overrideIf condition that is different from the override condition that is configured in the code-owners plugin configuration has no effect and is only confusing as the overrideIf condition from the Code-Owners submit requirement is shown in the UI but doesn't work. Change-Id: I5bfe4a45ad4e2ec67fae5ec3681012537e7b6a63 Signed-off-by: Edwin Kempin <ekempin@google.com> Reviewed-on: https://gerrit-review.googlesource.com/c/plugins/code-owners/+/412560 Reviewed-by: Patrick Hiesel <hiesel@google.com> Tested-by: Zuul <zuul-63@gerritcodereview-ci.iam.gserviceaccount.com>
- Loading branch information