Refine policy-bot governance and approval rules for PRs#92
Open
chechen58 wants to merge 6 commits into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Low Risk
The provided diff contains no actionable changes (only a
+++ /dev/nullmarker), 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/nullwithout 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.