-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
27 lines (26 loc) · 1.75 KB
/
.coderabbit.yaml
File metadata and controls
27 lines (26 loc) · 1.75 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
language: en-GB
reviews:
path_instructions:
- path: "newsfragments/*.rst"
instructions: |
Validate newsfragment files:
1. Read valid types from [tool.towncrier.type] in pyproject.toml.
2. Filename must follow one of these patterns:
- `[issue_number].[type].rst` — use this when a dedicated **issue** exists in the issue tracker.
- `+[hash].[type].rst` — use this (orphan format) when there is NO dedicated issue. A PR alone (without a backing issue) does NOT require the numbered format; orphan is acceptable.
Do NOT flag orphan fragments as incorrect when only a PR exists but no issue does.
3. Content must be a clear, concise description of the change (not just "fix" or "update").
4. Content should be suitable for inclusion in CHANGES.rst.
5. Verify the type matches the nature of the change based on towncrier type definitions.
6. Some changes may require multiple types, especially breaking changes.
pre_merge_checks:
custom_checks:
- name: "Newsfragment Check"
mode: "warning"
instructions: |
Check if a newsfragment file has been added to the newsfragments/ directory.
Read the towncrier configuration from pyproject.toml to determine valid newsfragment types.
If no newsfragment is present, suggest which type should be added based on the PR changes.
Suggest the filename format: [issue_or_pr_number].[type].rst (or +[hash].[type].rst for orphan fragments)
Remind contributors to use: `pipenv run towncrier create [number].[type].rst` (or `pipenv run towncrier create +.[type]` for orphan fragments)
Skip the check if the PR only updates existing newsfragments or is a trivial change.