Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
language: en-GB
reviews:
path_instructions:
- path: "newsfragments/*.rst"
instructions: |
Validate newsfragment files:
1. Read valid types from [tool.towncrier.fragment] in pyproject.toml
2. Filename must follow the pattern: [number].[type].rst OR +[hash].[type].rst where:
- [number] is an issue number or PR number
- [type] must be one of the types defined in towncrier configuration
3. Content must be a clear, concise description of the change
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. Flag any files with invalid types or malformed filenames
7. Check that the description is meaningful (not just "fix" or "update")

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
Remind contributors to use: `pipenv run towncrier create [number].[type].rst`
Skip the check if the PR only updates existing newsfragments or is a trivial change.
8 changes: 6 additions & 2 deletions .github/workflows/diagram.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ jobs:
- name: Install Mermaid CLI
run: npm install -g @mermaid-js/mermaid-cli

- name: Render Diagram
run: mmdc -p docs/puppeteer-config.json -i docs/architecture.mmd -o docs/images/architecture.svg -t neutral
- name: Render Diagrams
run: |
for file in docs/*.mmd; do
base="$(basename "${file}" .mmd)"
mmdc -p docs/puppeteer-config.json -i "${file}" -o "docs/images/${base}.svg" -t neutral
done

- name: Commit and Push
uses: stefanzweifel/git-auto-commit-action@v7
Expand Down
1 change: 1 addition & 0 deletions newsfragments/+4593101b.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add coderabbitai configuration with instructions to keep an eye for newsfragments.
1 change: 1 addition & 0 deletions newsfragments/+ba8eaaf7.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixes for diagram workflow.
Loading