docs: Add CHANGELOG.md with auto-update workflow#2690
Conversation
|
Warning Rate limit exceeded@koxudaxi has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 9 minutes and 15 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (3)
WalkthroughAdds automated changelog generation and integration. A new Bash script generates CHANGELOG.md from GitHub Releases, a GitHub Actions workflow automatically updates CHANGELOG.md on release publication, and the changelog is integrated into documentation via workflow step and mkdocs navigation. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2690 +/- ##
=======================================
Coverage 99.53% 99.53%
=======================================
Files 81 81
Lines 11358 11369 +11
Branches 1357 1357
=======================================
+ Hits 11305 11316 +11
Misses 32 32
Partials 21 21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
scripts/generate_changelog.sh (1)
19-30: Optimize API usage to avoid N+1 queries.The current implementation makes 3 API calls per release (1 for the list, then 2 more for each release's date and body). For 500 releases, this results in 1,001 API calls, which is slow and could hit rate limits.
🔎 Proposed fix to fetch all data in one call
# Get all releases and process them -gh release list --repo "$REPO" --limit 500 --json tagName --jq '.[].tagName' | while read -r tag; do - # Get release details (use // "" to handle null body) - DATE=$(gh release view "$tag" --repo "$REPO" --json publishedAt --jq '.publishedAt | split("T")[0]') - BODY=$(gh release view "$tag" --repo "$REPO" --json body --jq '.body // ""') - - echo "## [$tag](https://github.com/$REPO/releases/tag/$tag) - $DATE" +gh release list --repo "$REPO" --limit 500 --json tagName,publishedAt,body --jq '.[]' | while IFS= read -r release; do + tag=$(echo "$release" | jq -r '.tagName') + DATE=$(echo "$release" | jq -r '.publishedAt | split("T")[0]') + BODY=$(echo "$release" | jq -r '.body // ""') + + echo "## [$tag](https://github.com/$REPO/releases/tag/$tag) - $DATE" echo "" printf '%s\n' "$BODY" echo "" echo "---" echo "" doneThis reduces the API calls from 1,001 to just 1, significantly improving performance and avoiding rate limit issues.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/changelog.yaml(1 hunks).github/workflows/docs.yaml(1 hunks)mkdocs.yaml(1 hunks)scripts/generate_changelog.sh(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
- GitHub Check: benchmarks
- GitHub Check: 3.10 on Ubuntu
- GitHub Check: py312-black23 on Ubuntu
- GitHub Check: 3.9 on macOS
- GitHub Check: 3.10 on Windows
- GitHub Check: py312-isort7 on Ubuntu
- GitHub Check: 3.9 on Windows
- GitHub Check: py312-pydantic1 on Ubuntu
- GitHub Check: 3.12 on Windows
- GitHub Check: 3.11 on Windows
- GitHub Check: 3.9 on Ubuntu
- GitHub Check: 3.14 on Windows
- GitHub Check: 3.13 on Windows
🔇 Additional comments (5)
mkdocs.yaml (1)
101-101: LGTM!The changelog navigation entry is properly formatted and consistent with the existing navigation structure.
.github/workflows/changelog.yaml (2)
47-53: LGTM!The commit and push logic correctly uses the github-actions bot identity and includes proper checks to avoid empty commits. The conventional commit message format is appropriate.
13-16: Ensure PAT token has appropriate permissions for pushing to main branch.The workflow uses
secrets.PATfor checkout, which is necessary to allow commits to trigger other workflows (the defaultGITHUB_TOKENdoes not trigger workflows for security reasons). Ensure this PAT has thereposcope (orpublic_repofor public repositories) to allow pushing code that can trigger downstream workflows.scripts/generate_changelog.sh (2)
1-8: LGTM!The script setup follows best practices with proper error handling (
set -euo pipefail) and clear usage documentation.
10-16: LGTM!The header format matches the structure expected by the changelog update workflow (header followed by "---" separator).
CodSpeed Performance ReportMerging #2690 will not alter performanceComparing Summary
Footnotes
|
Summary by CodeRabbit
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.