Skip to content

Commit 91c2bf6

Browse files
Qbandevclaude
andauthored
fix: add fallback rule so non-matching PRs get approved status (#83)
When all rules have `if` conditions and none match, policy-bot posts an error status ("All rules were skipped"). Adding a fallback rule with no `if` and count:0 ensures non-matching PRs get a clean "approved" status while cherry-pick PRs on release/* branches continue to be evaluated by the targeted rule. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9d24585 commit 91c2bf6

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

policy.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ policy:
88
approval:
99
- or:
1010
- "cherry-pick auto-approval"
11+
- "no approval necessary"
1112

1213
approval_rules:
1314
- name: "cherry-pick auto-approval"
@@ -22,3 +23,8 @@ approval_rules:
2223
total: "< 200"
2324
requires:
2425
count: 0
26+
27+
- name: "no approval necessary"
28+
description: "Fallback rule — matches all PRs so policy-bot reports a clean status instead of an error"
29+
requires:
30+
count: 0

0 commit comments

Comments
 (0)