chore: add script to generate release notes based on commit history#12900
Draft
chore: add script to generate release notes based on commit history#12900
Conversation
The script takes the following inputs: - module name: as specified in versions.txt - module directory: path in the monorepo - version: version as found in versions.txt It scans backwards through the git history of versions.txt to find the commit where the version was changed to the provided version. It then finds the commit where the previous non-snapshot version was set. It uses this commit range to generate the commit history affecting that directory.
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a script to automate the generation of release notes based on commit history for specific modules. The review identified several improvements: the module name should be escaped in regex patterns to prevent issues with special characters, progress messages should be directed to stderr to avoid polluting output, and the logic for handling initial releases needs adjustment to ensure the full commit history is included.
…e note generator Addresses feedback from gemini-code-assist: - Escaped module name in regex patterns. - Redirected informational logs to stderr. - Adjusted initial release range logic to include the full history.
Adds unit tests that compare the script output against saved golden files: - Root generation for monorepo version 1.85.0. - Module generation for java-run at version 0.71.0.
Removes the --first-parent restriction from all Git commands in the script: - versions.txt history scanning. - Fallback for initial releases. - Commit extraction for release notes. This allows capturing commits from side branches that were not squashed, while relying on prefix filters to remove noise.
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.
The script takes the following inputs:
It scans backwards through the git history of versions.txt to find the commit where the version was changed to the provided version. It then finds the commit where the previous non-snapshot version was set. It uses this commit range to generate the commit history affecting that directory.