INF-1159/ci: shared release-notes script + auto-PR preview body#104
Conversation
Mirrors the abn fork's PR #69. New .github/scripts/release-notes.py is the single source of truth for the bucketing + bump-level decision. release.yml calls it for the actual GitHub Release notes; auto-pr.yml calls it with origin/main..HEAD and uses the output as the rolling sync PR's body. The PR description refreshes on every push to develop with the bucketed list AND the predicted bump level. Why Python: regex grows readable (named groups, real re.match) and the script is testable as it grows. setup-python is already installed so the cost is marginal.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
No critical issues found. The refactor is clean — Python script logic is correct, ^-anchored re.search calls are equivalent to match for single-line subjects, the ahead=0 early-exit path correctly sets the output variable before exiting so the conditional step gate works, and fetch-depth: 0 is properly added to give the script full commit history. Ready for human approval.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 399571b898
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # Use origin/main since actions/checkout only creates the | ||
| # workflow's own ref as a local branch — `main` alone | ||
| # wouldn't resolve here. | ||
| level=$(.github/scripts/release-notes.py "origin/main..HEAD" notes.md) |
There was a problem hiding this comment.
Build the preview from develop instead of HEAD
When this workflow is run via workflow_dispatch from the default branch, the checkout's HEAD is main, but the preceding compare call still checks whether develop is ahead. In that case this range is empty (origin/main..HEAD), so the workflow can create or overwrite the develop→main PR body with an empty notes section and a misleading patch prediction even though develop has releasable commits. Use the fetched develop ref (or checkout develop) for the preview range.
Useful? React with 👍 / 👎.
Linear: INF-1159
Mirrors the abn fork's #69.
New
.github/scripts/release-notes.pyis the single source of truth for the bucketing + bump-level decision:release.yml— calls it for the actual GitHub Release notes (replaces the inline bash bucketing).auto-pr.yml— calls it withorigin/main..HEADand uses the output as the rolling sync PR's body. The PR description refreshes on every push todevelopwith the bucketed list AND the predicted bump level.Why Python
Regex grows readable (named groups, real
re.matchinstead ofgrep -qE); the script is testable as it grows.setup-pythonis already installed so the cost is marginal.Test plan
python3 .github/scripts/release-notes.py 1.16.0..1.16.2 out.mdprintspatchand writes a bucketed file.developeither creates the sync PR with the preview body, or updates an existing PR's body.🤖 Generated with Claude Code