Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions policy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ policy:
approval:
- or:
- "cherry-pick auto-approval"
- "no approval necessary"
- "release branch review"
- "non-release fallback"

approval_rules:
- name: "cherry-pick auto-approval"
Expand All @@ -24,7 +25,22 @@ approval_rules:
requires:
count: 0

- name: "no approval necessary"
description: "Fallback rule — matches all PRs so policy-bot reports a clean status instead of an error"
- name: "release branch review"
description: "Require release-team review for all PRs targeting release branches"
if:
targets_branch:
pattern: "^release/.*$"
requires:
count: 1
teams:
- "MetaMask/release-team"

# RE2-compatible negation of "^release/.*$" (Go regexp does not support lookaheads).
# Matches any branch name that does NOT start with "release/".
- name: "non-release fallback"
description: "Auto-approve PRs targeting non-release branches so policy-bot posts a clean status"
if:
targets_branch:
pattern: "^([^r]|r[^e]|re[^l]|rel[^e]|rele[^a]|relea[^s]|releas[^e]|release[^/]).*$|^.{0,7}$"
requires:
count: 0