Update generate_changelog.py#8949
Conversation
|
Newest code from mattermost has been published to preview environment for Git SHA ecd58fc |
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ 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. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdated the changelog generation system prompt to enforce stricter section structure with a fixed hierarchy, defined top-level categories, and specific formatting constraints. Refactored changelog insertion to use a static header marker for reliable splicing. Removed explicit timeout from the milestone API request. ChangesChangelog Generation and Insertion
Sequence DiagramsequenceDiagram
participant script as generate_changelog.py
participant github as GitHub API
participant claude as Claude API
participant changelog as changelog.md
script->>github: get_milestone_number() (no timeout)
github-->>script: milestone_number
script->>claude: Call with SYSTEM_PROMPT + release notes
note over claude: Format sections as ###/#### hierarchy<br/>Include Open Source Components<br/>Detailed Upgrade Impact subsections<br/>No empty sections or horizontal rules
claude-->>script: Formatted changelog sections
script->>changelog: prepend_to_changelog()<br/>Insert after HEADER_END_MARKER
note over changelog: New release entry spliced<br/>after static header block
changelog-->>script: Insertion complete
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
Actionable comments posted: 1
🤖 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.
Inline comments:
In @.github/scripts/generate_changelog.py:
- Line 103: The requests.get call that assigns resp (resp = requests.get(url,
headers=HEADERS, params=params)) lacks a timeout, which can hang the changelog
generation; update that call to include a sensible timeout (e.g., timeout=10 or
a configured TIMEOUT constant) so the HTTP request fails fast on
slow/unresponsive GitHub API responses and handle the resulting timeout
exception as appropriate in the surrounding function.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f8b3dba5-78f2-4b65-b4c0-a2cf3bb1506f
📒 Files selected for processing (1)
.github/scripts/generate_changelog.py
There was a problem hiding this comment.
Pull request overview
Updates the changelog automation script used to generate and insert release-note content into Mattermost changelog pages, primarily by tightening the AI formatting instructions and changing how new entries are inserted so the static changelog header is preserved.
Changes:
- Expanded/refined the AI SYSTEM_PROMPT to enforce stricter section structure and formatting rules for generated changelog entries.
- Updated changelog insertion logic to insert new entries after a static header marker block (instead of naïvely prepending).
- Adjusted GitHub milestone fetching request behavior (notably removing the explicit HTTP timeout).
|
Newest code from mattermost has been published to preview environment for Git SHA d4ac649 |
|
Newest code from mattermost has been published to preview environment for Git SHA 42c6d68 |
|
Newest code from mattermost has been published to preview environment for Git SHA 5918800 |
Changelog automation script fixes.