Bugfix/release-body-limit#298
Conversation
|
Warning Review limit reached
Next review available in: 51 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAdds a "Limit release notes size" step to the release workflow generation. After git-cliff generates release-notes.md, a character count check (excluding spaces) against a 125,000-character threshold triggers replacement of the file with a shortened message linking to CHANGELOG.md. Corresponding unit tests are updated. ChangesRelease Notes Size Limiting
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Pull request overview
Adds a safeguard to the release workflow so oversized generated release notes don’t exceed GitHub’s release body limit, preventing release creation failures.
Changes:
- Add a “Limit release notes size” step that checks
release-notes.mdlength and replaces it with a CHANGELOG link when it exceedsMAX_CHARS. - Apply the same step both to the shipped workflow (
.github/workflows/release.yml) and the JS release-workflow preset generator. - Update unit tests to assert the new step is present in generated workflow/preset output.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/categories/js/release-workflow/preset/default.preset.ts |
Adds the size-limiting step to the preset-generated release workflow content. |
.github/workflows/release.yml |
Adds the size-limiting step to the repository’s actual release workflow. |
__tests__/unit/categories/js/release-workflow/release-workflow.installer.spec.ts |
Updates installer test fixture to include the new workflow step. |
__tests__/unit/categories/js/release-workflow/preset/index.spec.ts |
Updates preset snapshot/expectations to include the new preset step. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/release.yml (1)
91-99: 🔒 Security & Privacy | 🔵 Trivial | 💤 Low valueConsider using env vars for the templated expressions to satisfy zizmor's template-injection hint.
${{ github.repository }}and${{ steps.version.outputs.version }}are expanded directly into the shell script before execution. Actual risk here is low sinceversionis either regex-validated or derived fromgit-cliff --bumped-version, and this matches the existing convention used throughout the rest of the workflow. Still, passing these through env vars is a trivial hardening that removes the residual risk flagged by static analysis.🔒️ Suggested mitigation
- name: Limit release notes size + env: + REPO: ${{ github.repository }} + VERSION: ${{ steps.version.outputs.version }} run: |- MAX_CHARS=125000 CHARS=$(wc -m < release-notes.md | tr -d ' ') if [ "$CHARS" -gt "$MAX_CHARS" ]; then echo "Release notes are too large ($CHARS characters, max $MAX_CHARS). Linking to CHANGELOG.md instead." - echo "Release notes are too large to display here. See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/v${{ steps.version.outputs.version }}/CHANGELOG.md) for the full changelog." > release-notes.md + echo "Release notes are too large to display here. See [CHANGELOG.md](https://github.com/$REPO/blob/v$VERSION/CHANGELOG.md) for the full changelog." > release-notes.md fi🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/release.yml around lines 91 - 99, The “Limit release notes size” step embeds templated GitHub expressions directly in the shell command, which triggers the template-injection warning. Update this step to pass github.repository and steps.version.outputs.version through env vars, then use those variables inside the run script when building the CHANGELOG.md link, keeping the logic in the same release-notes.md handling block.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/release.yml:
- Around line 91-99: The “Limit release notes size” step embeds templated GitHub
expressions directly in the shell command, which triggers the template-injection
warning. Update this step to pass github.repository and
steps.version.outputs.version through env vars, then use those variables inside
the run script when building the CHANGELOG.md link, keeping the logic in the
same release-notes.md handling block.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 8646b34b-c7fd-4c0f-b210-113a73852f65
📒 Files selected for processing (4)
.github/workflows/release.yml__tests__/unit/categories/js/release-workflow/preset/index.spec.ts__tests__/unit/categories/js/release-workflow/release-workflow.installer.spec.tssrc/categories/js/release-workflow/preset/default.preset.ts
Task
Summary by CodeRabbit
Bug Fixes
Tests