Skip to content

feat: add reusable release-notes action - #610

Open
ulricden wants to merge 6 commits into
mainfrom
feat/add-realese-note-creator
Open

feat: add reusable release-notes action#610
ulricden wants to merge 6 commits into
mainfrom
feat/add-realese-note-creator

Conversation

@ulricden

Copy link
Copy Markdown
Contributor

Summary

  • Adds .github/actions/release-notes, a composite action generalizing smartapp's create_release_notes.py so any repo can create Notion release notes.
  • Linear issue detection is no longer limited to SORD-* tickets: the regex is configurable via linear_issue_pattern (default matches any team prefix, e.g. SORD-123, FOS-42, ABC-7).
  • Repo-specific values (Notion database ID, Linear workspace, PR/issue links) are now inputs instead of hardcoded constants; repo and from_ref/to_ref are 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_compile on the script
  • Verified against a synthetic git repo with merge commits referencing SORD-123, FOS-42, ABC-7, and a ticket-less merge — all correctly categorized
  • Verified the generalized auto-merge skip regex (based on to_ref instead of hardcoded develop)
  • Wire smartapp's create-release-notes.yml workflow to call this action (follow-up, not in this PR)

🤖 Generated with Claude Code

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>
@ulricden
ulricden requested a review from a team as a code owner July 17, 2026 13:09
@github-actions

Copy link
Copy Markdown
Contributor

🛡️ The security scan result : Repo and Config

ulricden and others added 5 commits July 17, 2026 15:57
…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>
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.

2 participants