feat: add reusable release-notes action - #610
Open
ulricden wants to merge 6 commits into
Open
Conversation
Generalizes smartapp's create_release_notes.py into a composite action usable by any repo: Linear issue detection is no longer limited to SORD tickets (configurable regex, defaults to any team prefix), and repo/Notion DB/refs are parameterized instead of hardcoded. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
…vely Ticket references like feat(SORD-1234) or test(sord-1232) only appear in the squashed commit's scope, not the merge commit subject, and are sometimes written in lowercase; search both and normalize to uppercase. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The merge-walking extractor missed tickets from PRs squash- or rebase-merged into develop (no merge commit of their own), where the ticket lives in the commit's conventional-commit scope (e.g. "feat(FWMS-2300): ..."). Those commits ended up in "Other" or were dropped entirely. Now scan every non-merge commit in the range to categorize ticketed commits, and keep a merge pass for branch-name-only tickets (e.g. "from .../SORD-123") and for grouping genuinely ticket-less PRs into "Other". Lower-case keys are matched only inside a conventional-commit scope to avoid false positives on branch names like "renovate/appium-3.x". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PRs whose branch names carry the ticket in lower case (e.g. "fix/fwms-2310",
"feat/fwms-2326-...", "fix/mas-710") were dropped into "Other" because the
merge-message pass only matched upper-case keys. Match branch names
case-insensitively, but:
- require a token boundary so mid-word matches like "to-56" in
"update-expo-to-56" are rejected;
- skip bot branches (renovate/, dependabot/) whose package names
("appium-3.x") look like tickets;
- restrict lower-case commit-subject matches to the conventional-commit
scope so prose like "utf-8" is not mistaken for a ticket.
Branch-only tickets are now categorized by the branch type prefix
(feat/ -> Features, fix/ -> Fixes) instead of the PR's first commit.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Passing "FWMS" (no -<number>) made the whole regex match the bare string
"FWMS", collapsing every ticket into one bogus key that 404'd on Linear
("Entity not found: Issue") and rendered as a dead link.
The input is now a team prefix (or alternation, e.g. "FWMS" / "FWMS|MAS");
the action appends "-\d+" itself to form the Linear identifier — mirroring
smartapp's hardcoded "SORD-\d+". The default prefix "[A-Z]{2,10}" still
matches any team. A guard also drops any extracted key that isn't a
canonical PREFIX-NUMBER, so a misconfigured input can no longer emit a
numberless key.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
.github/actions/release-notes, a composite action generalizing smartapp'screate_release_notes.pyso any repo can create Notion release notes.SORD-*tickets: the regex is configurable vialinear_issue_pattern(default matches any team prefix, e.g.SORD-123,FOS-42,ABC-7).repoandfrom_ref/to_refare auto-detected from the GitHub context (github.repository,github.event.pull_request.base/head.ref) rather than duplicated as inputs.Test plan
python -m py_compileon the scriptSORD-123,FOS-42,ABC-7, and a ticket-less merge — all correctly categorizedto_refinstead of hardcodeddevelop)create-release-notes.ymlworkflow to call this action (follow-up, not in this PR)🤖 Generated with Claude Code