Repository navigation
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
100 lines (99 loc) · 4.52 KB
/
Copy path.coderabbit.yaml
File metadata and controls
100 lines (99 loc) · 4.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# CodeRabbit config for GatherPress
# Reference: https://docs.coderabbit.ai/reference/configuration
# Defaults already match: chill profile, no poem, drafts skipped.
# AGENTS.md is picked up automatically as code guidelines, so project
# conventions live there; these instructions only add per-path emphasis.
reviews:
auto_review:
# Reviews are triggered intentionally, never automatically, so the
# hourly rate limit is spent on request: comment '@coderabbitai review'
# on the PR (or 'full review' to redo from scratch).
enabled: false
path_filters:
- "!build/**"
- "!vendor/**"
- "!node_modules/**"
- "!patches/**"
- "!**/*.min.js"
- "!**/*.map"
- "!package-lock.json"
- "!composer.lock"
# Generated assets and one-line changelog entry files; nothing to review.
- "!.wordpress-org/**"
- "!.gatherpress-org/**"
- "!.github/changelog/**"
path_instructions:
- path: "includes/**"
instructions: >-
WordPress plugin PHP with a PHP 8.1 minimum: modern syntax such as
the nullsafe operator is fine, and back-compat shims for older PHP
are unnecessary. Focus on output escaping, input sanitization,
nonce and capability checks, and correct use of WordPress APIs;
prefer core APIs over hand-rolled equivalents. User-facing strings
need i18n with the 'gatherpress' text domain. New functions,
classes, and hooks need complete docblocks. A new symbol gets
'@since TBD', which npm run version:bump resolves at release time
on the branch doing the releasing; a literal version on an
unreleased symbol fails the '@since tags' workflow, so do not ask
for one. Any other @since must resolve to a tag that exists in
git tag. Flag new or changed code paths that lack
PHPUnit coverage under test/unit/php. Skip style nits; PHPCS,
PHPStan, and PHPMD already run in CI.
- path: "src/**"
instructions: >-
Block editor JavaScript/React. Follow Gutenberg conventions:
@wordpress/i18n for strings, @wordpress/data stores for shared
state, @wordpress/components where available. Flag new or changed
code paths that lack Jest coverage under test/unit/js. Skip style
nits; ESLint and stylelint already run in CI.
- path: "src/**/view.js"
instructions: >-
Interactivity API view scripts are built as ES modules and must not
import @wordpress/i18n; it breaks the module build. Translatable
strings are localized in PHP and passed in via Interactivity API
state or context. Flag a direct @wordpress/i18n import here rather
than suggesting one.
- path: "src/helpers/interactivity.js"
instructions: >-
Bundled into the view scripts' module build, so the same constraint
as view.js files applies: no @wordpress/i18n imports.
- path: "test/**"
instructions: >-
Tests should assert behavior, not implementation details. PHPUnit
lives in test/unit/php, Jest in test/unit/js, and Playwright e2e in
test/e2e. Full branch coverage is the bar: flag new code paths in
the PR that lack unit or e2e coverage, including untested sides of
ternaries and fallback branches.
- path: ".github/**"
instructions: >-
Privileged workflows (workflow_run, pull_request_target) must never
execute code from the PR head; flag any checkout or execution of PR
code in a privileged context. Actions are referenced by major
version tag (@vN) by convention here, so do not suggest pinning
actions to commit SHAs.
- path: "docs/developer/hooks/**"
instructions: >-
Auto-generated by the extract-wp-hooks workflow on merge to
develop. Feature PRs must not commit changes here; flag them and
suggest reverting so CI regenerates the docs instead.
- path: "docs/**"
instructions: >-
Screenshots under docs are generated by the screenshot-generation
workflow; do not ask authors to update images manually. US English
spelling is enforced by the typos check in CI.
tools:
# CI already runs these (coding-standards, phpstan-tests, phpmd-tests,
# general-linting); re-running them here would duplicate comments.
phpstan:
enabled: false
phpcs:
enabled: false
phpmd:
enabled: false
eslint:
enabled: false
# Spelling is CI-enforced by typos; prose style in docs is deliberate.
languagetool:
enabled: false
markdownlint:
enabled: false