fix(attest jira): match Jira keys case-insensitively by uppercasing commit text#971
Open
jbrejner wants to merge 2 commits into
Open
fix(attest jira): match Jira keys case-insensitively by uppercasing commit text#971jbrejner wants to merge 2 commits into
jbrejner wants to merge 2 commits into
Conversation
…ommit text Previously `FindJiraIssueKeys` applied the regex to the original commit message, so mixed-case keys like `tDIE-12419` were silently missed. The fix uppercases the full input text before matching, meaning all returned keys are in canonical uppercase form (which Jira's API accepts regardless of the original casing). - `FindJiraIssueKeys`: uppercase text before regex, dedup and CVE filter on the uppercased copy so all case variants collapse into one result - `MakeJiraIssueKeyPattern`: add `\b` word boundary anchor, uppercase caller-supplied project keys for consistency - `attestJira` help text: document case-insensitive matching and the `note-1`/`PROJ-42` false-positive corner case Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Contributor
|
Claude finished @jbrejner's task in 2m 25s —— View job Review: case-insensitive Jira key matchingI reviewed the diff against
✅ What's good
🟡 Worth considering (non-blocking)
VerdictThe change correctly fixes the reported bug (mixed-case keys like |
Contributor
|
@jbrejner looks good, just a minor nit / optional: |
mbevc1
approved these changes
Jun 25, 2026
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
FindJiraIssueKeyswas silently missing Jira keys written in mixed case (e.g.tDIE-12419) because the regex was applied to the original commit text\bword boundary anchors and documents the case-insensitive behaviour inattestJirahelp textChanges
internal/jira/jira.go—FindJiraIssueKeysuppercases input before regex;MakeJiraIssueKeyPatternuppercases caller-supplied project keys and adds\bboundary anchorinternal/jira/jira_test.go— new test cases covering mixed-case keyscmd/kosli/attestJira.go— help text updated to document case-insensitive matching and thenote-1/PROJ-42false-positive corner caseTest plan
make test_integration_single TARGET=AttestJiraSuitepassesmake lintpasseskosli attest jira --helpshows updated case-insensitive matching documentation🤖 Generated with Claude Code