File tree Expand file tree Collapse file tree 4 files changed +36
-2
lines changed
Expand file tree Collapse file tree 4 files changed +36
-2
lines changed Original file line number Diff line number Diff line change 1+ language : en-GB
2+ reviews :
3+ path_instructions :
4+ - path : " newsfragments/*.rst"
5+ instructions : |
6+ Validate newsfragment files:
7+ 1. Read valid types from [tool.towncrier.fragment] in pyproject.toml
8+ 2. Filename must follow the pattern: [number].[type].rst OR +[hash].[type].rst where:
9+ - [number] is an issue number or PR number
10+ - [type] must be one of the types defined in towncrier configuration
11+ 3. Content must be a clear, concise description of the change
12+ 4. Content should be suitable for inclusion in CHANGES.rst
13+ 5. Verify the type matches the nature of the change based on towncrier type definitions
14+ 6. Flag any files with invalid types or malformed filenames
15+ 7. Check that the description is meaningful (not just "fix" or "update")
16+
17+ pre_merge_checks :
18+ custom_checks :
19+ - name : " Newsfragment Check"
20+ mode : " warning"
21+ instructions : |
22+ Check if a newsfragment file has been added to the newsfragments/ directory.
23+ Read the towncrier configuration from pyproject.toml to determine valid newsfragment types.
24+ If no newsfragment is present, suggest which type should be added based on the PR changes.
25+ Suggest the filename format: [issue_or_pr_number].[type].rst
26+ Remind contributors to use: `pipenv run towncrier create [number].[type].rst`
27+ Skip the check if the PR only updates existing newsfragments or is a trivial change.
Original file line number Diff line number Diff line change 1717 - name : Install Mermaid CLI
1818 run : npm install -g @mermaid-js/mermaid-cli
1919
20- - name : Render Diagram
21- run : mmdc -p docs/puppeteer-config.json -i docs/architecture.mmd -o docs/images/architecture.svg -t neutral
20+ - name : Render Diagrams
21+ run : |
22+ mkdir -p docs/images
23+ find docs -type f -name "*.mmd" -print0 | while IFS= read -r -d '' file; do
24+ base="$(basename "${file}" .mmd)"
25+ mmdc -p docs/puppeteer-config.json -i "${file}" -o "docs/images/${base}.svg" -t neutral
26+ done
2227
2328 - name : Commit and Push
2429 uses : stefanzweifel/git-auto-commit-action@v7
Original file line number Diff line number Diff line change 1+ Add coderabbitai configuration with instructions to keep an eye for newsfragments.
Original file line number Diff line number Diff line change 1+ Fixes for diagram workflow.
You can’t perform that action at this time.
0 commit comments