chore(review): CodeRabbit gates outside contributors' pull requests #16332
Mergedesthor(GitHub profile, opens in a new tab)merged 2 commits into
main fromrefs/pull/16332/headmerged by juliusmarminge View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- .coderabbit.config.ts lines 27 to 27OutdatedResolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -4,3 +7,21 @@7+- Adds a subsystem or user workflow, or is a large refactor across apps or packages.8+- Changes packages/contracts or persisted data in a way that existing clients or stored data might not accept.9+- Changes authentication, pairing, credentials, secrets, or remote connection trust.10+- Adds or changes an external side effect, such as acting on GitHub, publishing a release, or calling a webhook.11+- Adds, upgrades, or patches a dependency.12+- Changes CI or release configuration, agent or contributor instructions, or any review tool's configuration, including .github/, AGENTS.md, CONTRIBUTING.md, .agents/, and .coderabbit.config.ts.13+14+Otherwise pass. A focused bug fix, copy or layout fix, revert, or docs-only or test-only change passes unless a rule above applies. If you cannot decide, fail rather than report inconclusive. When failing, say that the pull request needs a maintainer's review.15+`;16+17+// Org members and collaborators merge their own pull requests. On anyone else's, CodeRabbit18+// requests changes until its comments are resolved and its checks pass, then approves.19+const UNGATED_AUTHORS = new Set(["OWNER", "MEMBER", "COLLABORATOR"]);20+const isGated = ({ pr }: CodeRabbitContext) => !UNGATED_AUTHORS.has(pr?.authorAssociation ?? "");21+22+export default defineConfig((ctx) => ({423 reviews: {524 high_level_summary: false,625 review_status: false,26+ request_changes_workflow: isGated(ctx),27+ allow_author_approval: false,
- .coderabbit.config.ts lines 25 to 32Resolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -4,8 +12,21 @@12+- Changes CI or release configuration, agent or contributor instructions, or any review tool's configuration, including .github/, AGENTS.md, CONTRIBUTING.md, .agents/, and .coderabbit.config.ts.13+14+Otherwise pass. A focused bug fix, copy or layout fix, revert, or docs-only or test-only change passes unless a rule above applies. If you cannot decide, fail rather than report inconclusive. When failing, say that the pull request needs a maintainer's review.15+`;16+17+// Org members and collaborators merge their own pull requests. On anyone else's, CodeRabbit18+// requests changes until its comments are resolved and its checks pass, then approves.19+const UNGATED_AUTHORS = new Set(["OWNER", "MEMBER", "COLLABORATOR"]);20+const isGated = ({ pr }: CodeRabbitContext) => !UNGATED_AUTHORS.has(pr?.authorAssociation ?? "");21+22+export default defineConfig((ctx) => ({423 reviews: {524 high_level_summary: false,625 review_status: false,26+ request_changes_workflow: isGated(ctx),27+ allow_author_approval: false,728 auto_review: {829 enabled: true,930 },1031 pre_merge_checks: {1132 docstrings: { mode: "off" },
- @@ -1,3 +1,3 @@1-import { defineConfig } from "@coderabbitai/config";1+import { defineConfig, type CodeRabbitContext } from "@coderabbitai/config";223-export default defineConfig({3+const approvability = `Fail when a maintainer should read this pull request before CodeRabbit approves it, and name the rule and file. Fail if it:
juliusmarminge merged thisc9b21b2
juliusmarminge closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed