-
Notifications
You must be signed in to change notification settings - Fork 52
Add coderabbit configuration #1270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughAdds a CodeRabbit review configuration for validating newsfragment files, changes the GitHub Actions diagram workflow to render multiple Mermaid files into Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Contributor
participant PR as "Pull Request"
participant CR as "CodeRabbit Review"
participant GH as "GitHub Actions"
participant TR as "Towncrier Config\n(pyproject.toml)"
participant R as "Repo (newsfragments, docs/*.mmd)"
Contributor->>PR: open/update PR
PR->>CR: trigger pre-merge checks
CR->>R: check for newsfragments/*.rst
CR->>TR: read [tool.towncrier.fragment] for valid types
alt missing or invalid fragment
CR-->>PR: warn with suggested filename and command
else valid fragment
CR-->>PR: pass or warn based on mode
end
PR->>GH: on push/merge, run workflows
GH->>R: find docs/*.mmd
GH->>GH: render each `.mmd` -> `docs/images/${base}.svg`
GH->>R: commit `docs/images/*.svg` with configured message
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Important Action Needed: IP Allowlist UpdateIf your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:
Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
.github/workflows/diagram.yml (2)
5-5:⚠️ Potential issue | 🟠 MajorUpdate workflow trigger to match recursive discovery.
The job now renders all docs/**/.mmd files, but the trigger only matches docs/.mmd. Changes in nested folders won’t run the workflow.
Proposed fix
- - 'docs/*.mmd' # Trigger only when mermaid files change + - 'docs/**/*.mmd' # Trigger when any mermaid file changes
20-31:⚠️ Potential issue | 🟠 MajorAvoid output collisions for same-named diagrams.
Using only the basename will overwrite outputs when two diagrams share a filename in different directories. Preserve the relative path (and update the commit pattern) to keep outputs unique.
Proposed fix
- name: Render Diagrams run: | mkdir -p docs/images find docs -type f -name "*.mmd" -print0 | while IFS= read -r -d '' file; do - base="$(basename "${file}" .mmd)" - mmdc -p docs/puppeteer-config.json -i "${file}" -o "docs/images/${base}.svg" -t neutral + rel="${file#docs/}" + out="docs/images/${rel%.mmd}.svg" + mkdir -p "$(dirname "${out}")" + mmdc -p docs/puppeteer-config.json -i "${file}" -o "${out}" -t neutral done @@ with: commit_message: "docs: update rendered mermaid diagram [skip ci]" - file_pattern: 'docs/images/*.svg' + file_pattern: 'docs/images/**/*.svg'
🤖 Fix all issues with AI agents
In `@newsfragments/`+4593101b.misc.rst:
- Line 1: The fragment filename suffix `misc` in
newsfragments/+4593101b.misc.rst doesn't match the Towncrier fragment types in
pyproject.toml; either rename the file to a configured type (e.g., change the
filename to use `miscellaneus` like +4593101b.miscellaneus.rst) or add `misc` to
the list under [tool.towncrier.fragment] in pyproject.toml so the validator
accepts it; locate the fragment file name and the Towncrier config section
([tool.towncrier.fragment]) and make the minimal change (rename the fragment
filename or update the configured types) to align them.
In `@newsfragments/`+ba8eaaf7.misc.rst:
- Line 1: The fragment filename suffix "misc" in
newsfragments/+ba8eaaf7.misc.rst doesn't match the Towncrier types configured
under [tool.towncrier.fragment] in pyproject.toml, causing validation to fail;
fix by either renaming the file to use the configured type (e.g., change to
+ba8eaaf7.miscellaneus.rst if "Miscellaneus" is listed) or update the Towncrier
config to include "misc" (or correct the type spelling) and ensure fragment type
validation reads the valid types from [tool.towncrier.fragment].
* additionally fix diagram workflow
Chore that needs to be done:
pipenv run towncrier create [issue_number].[type].rstTypes are defined in the pyproject.toml, issue_number either from issue tracker or the Pull request number
Summary by CodeRabbit
New Features
Bug Fixes
Chores