Skip to content

Refine policy-bot governance and approval rules for PRs#92

Open
chechen58 wants to merge 6 commits into
MetaMask:agents-cocfrom
chechen58:main
Open

Refine policy-bot governance and approval rules for PRs#92
chechen58 wants to merge 6 commits into
MetaMask:agents-cocfrom
chechen58:main

Conversation

@chechen58
Copy link
Copy Markdown

@chechen58 chechen58 commented May 16, 2026

Note

Low Risk
The provided diff contains no actionable changes (only a +++ /dev/null marker), so the risk is low; review should confirm the diff is complete and no files were unintentionally deleted.

Overview
No code or configuration changes are visible in the provided diff (it only shows +++ /dev/null without any file context).

Before merging, confirm the PR is not missing its diff and that no repository files were accidentally removed.

Reviewed by Cursor Bugbot for commit 71afeca. Bugbot is set up for automated code reviews on this repo. Configure here.

Qbandev and others added 6 commits March 4, 2026 17:32
Cherry-pick auto-approval for release branches + standard human review fallback.
…sk#82)

The "standard human review" rule had no `if` conditions, causing
policy-bot to post a `pending` status on every PR across all installed
repos. Removing it so only cherry-pick PRs targeting release/* branches
are evaluated; all other PRs will get a "skipped" status.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…ask#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>
…release (MetaMask#84)

Replace the blanket "no approval necessary" fallback with two scoped rules:

- "release branch review": requires release-team approval for all PRs
  targeting release/* branches that don't match cherry-pick criteria
- "non-release fallback": auto-approves PRs targeting non-release
  branches using RE2-compatible negation regex

This ensures PRs with wrong titles or large diffs on release branches
get PENDING status instead of being silently approved.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…embers (MetaMask#85)

Without an author check, any external user could open a fork PR targeting
a release/* branch with "cherry-pick" in the title and fewer than 200 LOC,
causing policy-bot to post a passing status check.

Add `has_author_in: organizations: ["MetaMask"]` to the cherry-pick
auto-approval rule so the auto-approval path is only reachable by members
of the MetaMask GitHub organization.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants