Skip to content

INF-1159/ci: shared release-notes script + auto-PR preview body#104

Merged
brtkwr merged 1 commit into
developfrom
ci/shared-release-notes
May 7, 2026
Merged

INF-1159/ci: shared release-notes script + auto-PR preview body#104
brtkwr merged 1 commit into
developfrom
ci/shared-release-notes

Conversation

@brtkwr
Copy link
Copy Markdown
Member

@brtkwr brtkwr commented May 7, 2026

Linear: INF-1159

Mirrors the abn fork's #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 (replaces the inline bash bucketing).
  • 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 instead of grep -qE); the script is testable as it grows. setup-python is already installed so the cost is marginal.

Test plan

  • Local smoke test: python3 .github/scripts/release-notes.py 1.16.0..1.16.2 out.md prints patch and writes a bucketed file.
  • After merge, the next push to develop either creates the sync PR with the preview body, or updates an existing PR's body.

🤖 Generated with Claude Code

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.
@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@brtkwr brtkwr merged commit 47f5fd4 into develop May 7, 2026
18 checks passed
@brtkwr brtkwr deleted the ci/shared-release-notes branch May 7, 2026 13:58
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