Add script to draft release notes from GitHub API#8934
Open
tautschnig wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds automation to draft CBMC release notes from GitHub-generated release notes, and updates the release workflow/docs to integrate the changelog into the release process.
Changes:
- Add
scripts/draft_release_notes.pyto generate a draft CHANGELOG entry (including a heuristic summary) using the GitHub release-notes API viagh. - Document the new changelog drafting step in
doc/ADR/release_process.md. - Add a CHANGELOG link to the release body in
.github/workflows/regular-release.yaml.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
scripts/draft_release_notes.py |
New script to generate draft release notes/CHANGELOG entry from GitHub API output. |
doc/ADR/release_process.md |
Documents the changelog/release-notes drafting step for release managers. |
.github/workflows/regular-release.yaml |
Adds a CHANGELOG reference to the auto-created GitHub release body. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #8934 +/- ##
===========================================
- Coverage 80.60% 80.60% -0.01%
===========================================
Files 1711 1711
Lines 189466 189466
Branches 73 73
===========================================
- Hits 152719 152713 -6
- Misses 36747 36753 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
a0f6042 to
08e4d46
Compare
Add scripts/draft_release_notes.py, which calls GitHub's release-notes generation endpoint (via `gh`) to produce a PR list in the same format as the existing CHANGELOG file. It prepends a heuristic draft summary that highlights user-visible feature PRs and counts the remaining changes, marked with an HTML comment reminding the release manager to review and edit it. When no user-visible feature is detected, a TODO placeholder is emitted instead of guessing. Errors from a missing or failing `gh` are reported cleanly rather than as stack traces. Previous-tag detection only considers tags of the form cbmc-X.Y(.Z), so historical conference/hash-suffixed tags (e.g. cbmc-4.5-sv-comp-2014) do not collide with the bare versions when ordering. The summary is produced as a structured value so the prose body can be wrapped independently of the HTML comment. Usage: scripts/draft_release_notes.py cbmc-<version> Also add a link to the CHANGELOG file in the release body generated by the regular-release workflow (an absolute, tag-pinned URL so it resolves from the release page), and update doc/ADR/release_process.md to document the new script as a numbered step performed before pushing the release tag, including manually prepending the generated entry to CHANGELOG. scripts/test_draft_release_notes.py adds unit tests for the previous-tag selection (including the suffixed-tag filter) and the draft-summary heuristic. The script was also exercised end-to-end against cbmc-6.9.0. Fixes: diffblue#7907 Co-authored-by: Kiro <kiro-agent@users.noreply.github.com>
08e4d46 to
690f3c6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add scripts/draft_release_notes.py, which calls the GitHub release-notes generation endpoint (via
gh) to produce a PR list in the same format as the existing CHANGELOG file. It also prepends a heuristic draft summary paragraph that highlights user-visible features and counts bug fixes. The summary is marked with an HTML comment reminding the release manager to review and edit it before committing.Usage: scripts/draft_release_notes.py cbmc-
Also add a link to the CHANGELOG file in the release body generated by the regular-release workflow, and update doc/ADR/release_process.md to document the new script.
Fixes: #7907