Skip to content

Extract added issues from the body of a revert commit#73

Merged
axelniklasson merged 4 commits into
mainfrom
axel/lin-69678-revert-did-not-trigger-release-management-deployed-status
May 15, 2026
Merged

Extract added issues from the body of a revert commit#73
axelniklasson merged 4 commits into
mainfrom
axel/lin-69678-revert-did-not-trigger-release-management-deployed-status

Conversation

@axelniklasson
Copy link
Copy Markdown
Collaborator

Scan the body of revert commits for magic-word references — that's where manually added Fixes ENG-N notes live, not in the auto-generated Revert "..." subject. This fixes a bug in which the CLI ignored Fixes ENG-123 in a revert commit body, so the issue wasn't associated with the release.

Examples

A. Standard GitHub revert with a developer-added Fixes

Revert "Original feature" (#456)

Reverts org/repo#123

Fixes ENG-123
issues revertedIssues
Before {} {ENG-123}
After {ENG-123} {}

B. Same shape but with quoted content in the body

The case the greedy regex broke — the trailing " in the img tag closed the regex and swallowed the body.

Revert "Original feature" (#456)

Fixes ENG-123

<img alt="screenshot" src="https://example.com/x.png" />
issues revertedIssues
Before {} {ENG-123}
After {ENG-123} {}

C. Magic word in both the inner subject and the body — split correctly

Revert "Fixes ENG-100"

Fixes ENG-123
issues revertedIssues
Before {} {ENG-100}
After {ENG-123} {ENG-100}

@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 15, 2026

LIN-69678

Copy link
Copy Markdown

@linear-code linear-code Bot left a comment

Choose a reason for hiding this comment

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

Left some comments. The fix correctly handles the message-body scan, but the early-return on odd branchDepth (line 201) short-circuits the whole function before afterTitle is ever considered — meaning the fix has no effect for the most common GitHub revert flow, where the branch IS named revert-<N>-<slug>.

Comment thread src/extractors.ts Outdated
@axelniklasson axelniklasson requested a review from RomainCscn May 15, 2026 12:47
@axelniklasson axelniklasson merged commit 4e382c4 into main May 15, 2026
10 checks passed
@axelniklasson axelniklasson deleted the axel/lin-69678-revert-did-not-trigger-release-management-deployed-status branch May 15, 2026 12:55
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