Skip to content

Add --issue-pattern flag for custom subject identifier extraction - #124

Merged
RomainCscn merged 3 commits into
mainfrom
romain/fea-12200-issue-pattern-flag
Jul 27, 2026
Merged

Add --issue-pattern flag for custom subject identifier extraction#124
RomainCscn merged 3 commits into
mainfrom
romain/fea-12200-issue-pattern-flag

Conversation

@RomainCscn

@RomainCscn RomainCscn commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Adds --issue-pattern=<regex> to sync: a user-supplied regex whose capture group 1 extracts issue identifiers from commit subjects, for conventions the built-in start-anchored patterns can't see — feat(routing)[ENG-123]: …, feat(api): ENG-621 …, suffixed … DEV-123 DEV-124.

  • Applied to the subject only, case-insensitively, matched globally; additive to branch-name / magic-word / built-in subject detection and deduplicated through the same path, so behavior without the flag is unchanged.
  • Captures go through matchAllIdentifiers, reusing shape validation, uppercasing, and leading-zero rejection; iteration uses matchAll, so zero-width-capable patterns can't loop.
  • Validated at parse time: the regex must compile and contain a capture group. A scan where the pattern matches subjects but group 1 never yields a valid identifier warns instead of failing silently.
  • Recorded in debugSink.issuePattern — requires linear/linear-app#83794 deployed first, since ReleaseDebugSinkInput is a closed input type.

Supersedes #117 (thanks @MatthewCline-git — same flag shape; this adds the zero-width guard, capture-group validation, the misplaced-group warning, scan-level tests, and docs).

Closes #106. Fixes #106

@linear-code

linear-code Bot commented Jul 27, 2026

Copy link
Copy Markdown

FEA-12200

@RomainCscn
RomainCscn requested a review from mwolting July 27, 2026 09:59
@RomainCscn
RomainCscn merged commit a0a2903 into main Jul 27, 2026
10 checks passed
@RomainCscn
RomainCscn deleted the romain/fea-12200-issue-pattern-flag branch July 27, 2026 10:01
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.

Release CLI: --issue-pattern flag to extract issue IDs from custom subject formats (e.g. Conventional Commits)

2 participants