|
| 1 | +# Corbits Triage policy. |
| 2 | +rules: |
| 3 | + - check: max-files-changed |
| 4 | + text: Flag pull requests over 30 files changed. |
| 5 | + max: 30 |
| 6 | + onFail: label |
| 7 | + reason: A large change is a risk signal, not a hold. |
| 8 | + evidence: |
| 9 | + - maintainer-stated |
| 10 | + - check: max-lines-changed |
| 11 | + text: Flag pull requests over 5,000 lines changed. |
| 12 | + max: 5000 |
| 13 | + onFail: label |
| 14 | + reason: A large change is a risk signal, not a hold. |
| 15 | + evidence: |
| 16 | + - maintainer-stated |
| 17 | + - check: no-merge-conflicts |
| 18 | + text: Flag merge conflicts with the base branch. |
| 19 | + reason: A pull request with conflicts cannot be merged as it is. |
| 20 | + evidence: |
| 21 | + - maintainer-stated |
| 22 | + - check: ci-green |
| 23 | + text: CI must pass before merge. |
| 24 | + reason: A change is not ready until CI passes. |
| 25 | + evidence: |
| 26 | + - maintainer-stated |
| 27 | + - check: conventional-commits |
| 28 | + text: Titles and commits follow Conventional Commits. |
| 29 | + reason: Titles and commits use the conventional form. |
| 30 | + evidence: |
| 31 | + - maintainer-stated |
| 32 | + - check: hidden-content |
| 33 | + text: Flag text hidden in the pull request. |
| 34 | + reason: Hidden text can steer a review. |
| 35 | + evidence: |
| 36 | + - maintainer-stated |
| 37 | + - check: no-duplicate |
| 38 | + text: Flag a pull request whose diff or commits match another open one. |
| 39 | + reason: Two pull requests for the same change waste a review. |
| 40 | + evidence: |
| 41 | + - maintainer-stated |
| 42 | + - check: sensitive-paths |
| 43 | + text: Route schema, auth, CI and lockfile changes to a person. |
| 44 | + reason: Those changes reach beyond what the diff shows. |
| 45 | + evidence: |
| 46 | + - maintainer-stated |
| 47 | + - check: no-forbidden-paths |
| 48 | + text: Never accept changes to node_modules/**. |
| 49 | + paths: |
| 50 | + - node_modules/** |
| 51 | + reason: Dependencies are not edited by hand. |
| 52 | + evidence: |
| 53 | + - maintainer-stated |
| 54 | + - id: no-ai-attribution |
| 55 | + check: text |
| 56 | + text: Titles, descriptions and commits carry no AI attribution. |
| 57 | + fields: [title, description, commits] |
| 58 | + failWhen: contains |
| 59 | + phrases: |
| 60 | + - "Co-Authored-By:" |
| 61 | + - "Claude-Session:" |
| 62 | + - "claude.ai/code/session" |
| 63 | + - "noreply@anthropic.com" |
| 64 | + - "Generated with Claude" |
| 65 | + - "Generated with [Claude" |
| 66 | + onFail: label |
| 67 | + reason: No AI co-author lines, session trailers, or generated-with footers. |
| 68 | + evidence: |
| 69 | + - maintainer-stated |
| 70 | + - id: conventions |
| 71 | + check: code-patterns |
| 72 | + text: Added code follows the repository's conventions. |
| 73 | + presets: |
| 74 | + - convention |
| 75 | + onFail: label |
| 76 | + reason: No invented fallbacks, nested ternaries, immediately invoked functions, promise chains, empty catches, or suppression comments. |
| 77 | + evidence: |
| 78 | + - maintainer-stated |
| 79 | + - id: no-process-env-in-tests |
| 80 | + check: code-patterns |
| 81 | + text: Tests do not read process.env. |
| 82 | + onFail: label |
| 83 | + reason: A test must not depend on the environment. |
| 84 | + evidence: |
| 85 | + - maintainer-stated |
| 86 | + patterns: |
| 87 | + - id: no-process-env-in-tests |
| 88 | + language: typescript |
| 89 | + message: Reads process.env in a test. |
| 90 | + files: |
| 91 | + [ |
| 92 | + "**/*.test.ts", |
| 93 | + "**/*.test.tsx", |
| 94 | + "**/*.test.js", |
| 95 | + "**/*.test.jsx", |
| 96 | + "**/*.test.mjs", |
| 97 | + "**/*.test.cjs", |
| 98 | + ] |
| 99 | + rule: |
| 100 | + pattern: process.env |
| 101 | + - id: no-process-env-in-tests |
| 102 | + language: javascript |
| 103 | + message: Reads process.env in a test. |
| 104 | + files: |
| 105 | + [ |
| 106 | + "**/*.test.ts", |
| 107 | + "**/*.test.tsx", |
| 108 | + "**/*.test.js", |
| 109 | + "**/*.test.jsx", |
| 110 | + "**/*.test.mjs", |
| 111 | + "**/*.test.cjs", |
| 112 | + ] |
| 113 | + rule: |
| 114 | + pattern: process.env |
| 115 | +actions: |
| 116 | + pass: |
| 117 | + - do: approve |
| 118 | + when: |
| 119 | + author: |
| 120 | + - users: |
| 121 | + - thegreataxios |
| 122 | + - brianjfox |
| 123 | + - do: request-review |
| 124 | + target: |
| 125 | + to: users |
| 126 | + users: |
| 127 | + - thegreataxios |
| 128 | + when: |
| 129 | + author: |
| 130 | + - external |
| 131 | + fail: |
| 132 | + - do: request-changes |
| 133 | + unsure: |
| 134 | + - do: assign |
| 135 | + target: |
| 136 | + to: users |
| 137 | + users: |
| 138 | + - thegreataxios |
| 139 | + when: |
| 140 | + author: |
| 141 | + - maintainers |
0 commit comments