Skip to content

Commit 41e4e2d

Browse files
committed
ci(policy): add convention checks without code review
1 parent d3c12be commit 41e4e2d

1 file changed

Lines changed: 125 additions & 0 deletions

File tree

‎.corbits-triage.yml‎

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
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: ["**/*.test.ts", "**/*.test.tsx", "**/*.test.js", "**/*.test.jsx", "**/*.test.mjs", "**/*.test.cjs"]
91+
rule:
92+
pattern: process.env
93+
- id: no-process-env-in-tests
94+
language: javascript
95+
message: Reads process.env in a test.
96+
files: ["**/*.test.ts", "**/*.test.tsx", "**/*.test.js", "**/*.test.jsx", "**/*.test.mjs", "**/*.test.cjs"]
97+
rule:
98+
pattern: process.env
99+
actions:
100+
pass:
101+
- do: approve
102+
when:
103+
author:
104+
- users:
105+
- thegreataxios
106+
- brianjfox
107+
- do: request-review
108+
target:
109+
to: users
110+
users:
111+
- thegreataxios
112+
when:
113+
author:
114+
- external
115+
fail:
116+
- do: request-changes
117+
unsure:
118+
- do: assign
119+
target:
120+
to: users
121+
users:
122+
- thegreataxios
123+
when:
124+
author:
125+
- maintainers

0 commit comments

Comments
 (0)