From d536992a9d4adb60354d522db8922a4ba1a9e65f Mon Sep 17 00:00:00 2001 From: "banar@joom.com" Date: Mon, 29 Dec 2025 20:32:43 +0200 Subject: [PATCH 1/2] Parse id from branch and accept lower case in project name --- src/helpers/github.ts | 4 ++++ src/helpers/issue.ts | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/helpers/github.ts b/src/helpers/github.ts index 5af9da6..07bbef6 100644 --- a/src/helpers/github.ts +++ b/src/helpers/github.ts @@ -61,6 +61,10 @@ export async function getPullRequestIssueIds(pr: PullRequestType): Promise ids.add(id)); } + if (typeof pr.head?.ref === 'string') { + extractIssueNumbers(pr.head.ref).map((id) => ids.add(id)); + } + return [...ids]; } diff --git a/src/helpers/issue.ts b/src/helpers/issue.ts index e86bec1..f27d5fb 100644 --- a/src/helpers/issue.ts +++ b/src/helpers/issue.ts @@ -1,7 +1,7 @@ -const ISSUE_PATTERN_RE = /(? = new Set(); - string.match(ISSUE_PATTERN_RE)?.forEach((issue) => result.add(issue)); + string.match(ISSUE_PATTERN_RE)?.forEach((issue) => result.add(issue.toUpperCase())); return [...result]; } From 6d4c778ce3b7318f579d1ab3ba5e991dfeafbfee Mon Sep 17 00:00:00 2001 From: "banar@joom.com" Date: Mon, 29 Dec 2025 21:02:39 +0200 Subject: [PATCH 2/2] Update test to support lower and mixed case --- src/helpers/__tests__/issue.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/__tests__/issue.spec.ts b/src/helpers/__tests__/issue.spec.ts index e6a3136..fc302a1 100644 --- a/src/helpers/__tests__/issue.spec.ts +++ b/src/helpers/__tests__/issue.spec.ts @@ -17,7 +17,7 @@ describe('extractIssueNumbers function', () => { it('should extract issue numbers when surrounded by non-alphanumeric characters', () => { const input = 'Issue: (ABC-789), Dash-123, Colon:XYZ-456'; - const expectedOutput = ['ABC-789', 'XYZ-456']; + const expectedOutput = ['ABC-789', 'DASH-123', 'XYZ-456']; expect(extractIssueNumbers(input)).toEqual(expectedOutput); });