ci: only check active groups for the `no-groups-above-this-*` checks (#38259)
Since PullApprove starts all inactive groups as a pending state, to properly assess if any groups we care about are pending we must only check the active groups. We additionally do this with rejected because the intention of the reusable checks is around checking active rules only. PR Close #38259
This commit is contained in:
parent
9893576ef0
commit
8a543d8b50
|
@ -75,12 +75,14 @@ meta:
|
|||
# By checking the number of active/pending/rejected groups when these are excluded, we can determine
|
||||
# if any other groups are matched.
|
||||
#
|
||||
# Note: Because all inactive groups start as pending, we are only checking pending and rejected active groups.
|
||||
#
|
||||
# Also note that the ordering of groups matters in this file. The only groups visible to the current
|
||||
# one are those that appear above it.
|
||||
no-groups-above-this-pending: &no-groups-above-this-pending
|
||||
len(groups.pending.exclude("required-minimum-review").exclude("global-approvers").exclude("global-docs-approvers")) == 0
|
||||
len(groups.active.pending.exclude("required-minimum-review").exclude("global-approvers").exclude("global-docs-approvers")) == 0
|
||||
no-groups-above-this-rejected: &no-groups-above-this-rejected
|
||||
len(groups.rejected.exclude("required-minimum-review").exclude("global-approvers").exclude("global-docs-approvers")) == 0
|
||||
len(groups.active.rejected.exclude("required-minimum-review").exclude("global-approvers").exclude("global-docs-approvers")) == 0
|
||||
no-groups-above-this-active: &no-groups-above-this-active
|
||||
len(groups.active.exclude("required-minimum-review").exclude("global-approvers").exclude("global-docs-approvers")) == 0
|
||||
|
||||
|
|
Loading…
Reference in New Issue