Add changelog generation tool for GitHub milestones#13063
Add changelog generation tool for GitHub milestones#13063cmcfarlen wants to merge 5 commits intoapache:masterfrom
Conversation
|
hmm, the uv.lock file is making the RAT check mad. Should I remove uv.lock? |
I think it's recommended to add uv.lock to ensure the exact packages are added. Let's add it back. The problem wasn't your patch adding the lock, the problem is the RAT check incorrectly failing on the lock file. I'll update CI to allow it. Update |
2b949cf to
44f4931
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces a new Python-based changelog generator under tools/changelog/ to produce CHANGELOG-*-style output from GitHub milestones (via direct REST API calls or the gh CLI), and updates the release-process documentation to use it.
Changes:
- Add
tools/changelog/changelog.pywith text/YAML output and an extended--docmode for richer metadata. - Add
tools/changelog/pyproject.tomlandtools/changelog/uv.lockfor dependency management/execution viauv. - Update release-process docs to use the new tool (with
--use-gh).
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| tools/changelog/changelog.py | Implements milestone PR collection via REST API or gh, plus output formatting. |
| tools/changelog/pyproject.toml | Defines the Python project and console script entry point. |
| tools/changelog/uv.lock | Pins Python dependencies for uv-managed execution. |
| doc/developer-guide/release-process/index.en.rst | Updates the documented release workflow to generate changelogs via the new tool. |
Replaces tools/git/changelog.pl with a Python implementation that generates changelogs from merged PRs in a milestone using the GitHub API or gh CLI. Default output matches the existing CHANGELOG-* file format. The --doc mode includes merge SHAs, labels, and full PR descriptions to guide AI-assisted release documentation updates. Supports text and YAML output formats. Co-Authored-By: Claude <noreply@anthropic.com>
Replace reference to tools/git/changelog.pl with the new tools/changelog/changelog.py invocation using uv run. Co-Authored-By: Claude <noreply@anthropic.com>
e208668 to
cd07fa5
Compare
There was a problem hiding this comment.
Pull request overview
Replaces the legacy Perl-based milestone changelog generator with a new Python tool under tools/changelog/ that can pull merged PRs for a milestone via the GitHub REST API or the gh CLI, and updates the release process docs accordingly.
Changes:
- Removed
tools/git/changelog.pl(Perl implementation). - Added a Python-based changelog generator (
tools/changelog/changelog.py) with apyproject.toml+uv.lockfor dependency management. - Updated release-process documentation to use the new tool.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/git/changelog.pl | Removes the old Perl changelog generator. |
| tools/changelog/changelog.py | New Python tool for generating milestone changelogs via GitHub API or gh, with optional doc/YAML output. |
| tools/changelog/pyproject.toml | Defines the Python tool project and dependencies. |
| tools/changelog/uv.lock | Locks Python dependencies for reproducible runs via uv. |
| doc/developer-guide/release-process/index.en.rst | Updates release instructions to use the new Python tool. |
| [project] | ||
| name = "changelog" | ||
| version = "0.1.0" | ||
| description = "Generate changelog from GitHub milestones for Apache Traffic Server" | ||
| requires-python = ">=3.11" | ||
| dependencies = [ | ||
| "httpx>=0.27", | ||
| "pyyaml>=6.0", | ||
| ] |
| CHANGELOG-X.Y.Z | ||
| uv run --project tools/changelog python tools/changelog/changelog.py \ | ||
| -o apache -r trafficserver -m X.Y.Z --use-gh > CHANGELOG-X.Y.Z | ||
|
|
| uv run --project tools/changelog python tools/changelog/changelog.py \ | ||
| -o apache -r trafficserver -m 10.2.0 > CHANGELOG-10.2.0 | ||
|
|
||
| Use --doc to include extra metadata (merge commit SHA, full commit message, |
| parser.add_argument("-m", "--milestone", required=True, help="Milestone title") | ||
| parser.add_argument("-a", "--auth", default=None, help="GitHub auth token (or set GH_TOKEN env var)") | ||
| parser.add_argument("-v", "--verbose", action="store_true", help="Verbose output") |
| sys.exit(2) | ||
|
|
||
|
|
||
| def main(): |
Replaces tools/git/changelog.pl with a Python implementation that generates changelogs from merged PRs in a milestone using the GitHub API or gh CLI. Default output matches the existing CHANGELOG-* file format. The --doc mode includes merge SHAs, labels, and full PR descriptions to guide AI-assisted release documentation updates. Supports text and YAML output formats.