Skip to content

chore: add script to generate release notes based on commit history#12900

Draft
meltsufin wants to merge 4 commits intomainfrom
impl/release-note-generator
Draft

chore: add script to generate release notes based on commit history#12900
meltsufin wants to merge 4 commits intomainfrom
impl/release-note-generator

Conversation

@meltsufin
Copy link
Copy Markdown
Member

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.

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.
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .github/release-note-generation/generate_module_notes.py Outdated
Comment thread .github/release-note-generation/generate_module_notes.py Outdated
Comment thread .github/release-note-generation/generate_module_notes.py Outdated
Comment thread .github/release-note-generation/generate_module_notes.py Outdated
Comment thread .github/release-note-generation/generate_module_notes.py
Comment thread .github/release-note-generation/generate_module_notes.py Outdated
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant