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 },
31 knowledge_base: {
32 code_guidelines: {
33 filePatterns: [
34 { files: "docs/internals/effect-services.md", applyTo: "{apps,packages,infra}/**/*.ts" },
35 { files: "docs/internals/web-ui.md", applyTo: "apps/web/src/**/*.{tsx,css}" },
36 ],
37 },
38 },
39}));