Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

.coderabbit.config.ts

45 lines1.6 KB

1import { defineConfig, type CodeRabbitContext } from "@coderabbitai/config";
2​
3// Org members and collaborators merge their own pull requests. On anyone else's, CodeRabbit
4// requests changes until its comments are resolved, then approves.
5const UNGATED_AUTHORS = new Set(["OWNER", "MEMBER", "COLLABORATOR"]);
6const isGated = ({ pr }: CodeRabbitContext) => !UNGATED_AUTHORS.has(pr?.authorAssociation ?? "");
7​
8export default defineConfig((ctx) => ({
9 reviews: {
10 high_level_summary: false,
11 review_status: false,
12 request_changes_workflow: isGated(ctx),
13 allow_author_approval: !isGated(ctx),
14 auto_review: {
15 enabled: true,
16 },
17 pre_merge_checks: {
18 docstrings: { mode: "off" },
19 override_requested_reviewers_only: isGated(ctx),
20 },
21 path_filters: [
22 // Vendored read-only reference checkouts of upstream Effect and Alchemy
23 // (see scripts/lib/reference-repos.ts). Nothing imports from them.
24 "!.repos/**",
25 ],
26 path_instructions: [
27 {
28 path: "{apps,packages,infra}/**/*.ts",
29 instructions: "Hold changed code to the rules in docs/internals/effect-services.md.",
30 },
31 {
32 path: "apps/web/src/**/*.{tsx,css}",
33 instructions: "Hold changed code to the rules in docs/internals/web-ui.md.",
34 },
35 ],
36 },
37 knowledge_base: {
38 code_guidelines: {
39 filePatterns: [
40 { files: "docs/internals/effect-services.md", applyTo: "{apps,packages,infra}/**/*.ts" },
41 { files: "docs/internals/web-ui.md", applyTo: "apps/web/src/**/*.{tsx,css}" },
42 ],
43 },
44 },
45}));