Open History to see the last commit
1import { defineConfig, type CodeRabbitContext } from "@coderabbitai/config";
2
3const UNGATED_AUTHORS = new Set(["OWNER", "MEMBER", "COLLABORATOR"]);
4const isGated = ({ pr }: CodeRabbitContext) => !UNGATED_AUTHORS.has(pr?.authorAssociation ?? "");
5
6export default defineConfig((ctx) => ({
7 reviews: {
8 high_level_summary: false,
9 review_status: false,
10 request_changes_workflow: false,
11 allow_author_approval: !isGated(ctx),
12 auto_review: {
13 enabled: true,
14 },
15 pre_merge_checks: {
16 docstrings: { mode: "off" },
17 override_requested_reviewers_only: isGated(ctx),
18 },
19 path_filters: ["!.repos/**"],
20 path_instructions: [
21 {
22 path: "{apps,packages,infra}/**/*.ts",
23 instructions: "Hold changed code to the rules in docs/internals/effect-services.md.",
24 },
25 {
26 path: "apps/web/src/**/*.{tsx,css}",
27 instructions: "Hold changed code to the rules in docs/internals/web-ui.md.",
28 },
29 {
30 path: "**/*.test.*",
31 instructions:
32 "Hold changed tests to the rules in docs/internals/testing.md. Request tests only as those rules allow.",
33 },
34 ],
35 },
36 knowledge_base: {
37 code_guidelines: {
38 filePatterns: [
39 { files: "docs/internals/effect-services.md", applyTo: "{apps,packages,infra}/**/*.ts" },
40 { files: "docs/internals/web-ui.md", applyTo: "apps/web/src/**/*.{tsx,css}" },
41 { files: "docs/internals/testing.md", applyTo: "{apps,packages,infra}/**/*.{ts,tsx}" },
42 ],
43 },
44 },
45}));