From 0cf1c0986859e7d6598384318e60350567d55dce Mon Sep 17 00:00:00 2001 From: Xavier Krantz Date: Thu, 8 Jan 2026 15:34:48 +0100 Subject: [PATCH 1/4] feat: Add support for repository name with dots --- src/utils.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/utils.ts b/src/utils.ts index 5ce6464..0591e42 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -33,11 +33,14 @@ export function parseRepositoryUrl(url: string): { // - https://github.com/owner/repo // - owner/repo - let match = url.match(/github\.com[:/]([^/]+)\/([^/.]+)/); + // First, remove `.git` if it exist + let sanitizedUrl = url.replace(/\.git$/, ""); + + let match = sanitizedUrl.match(/github\.com[:/]([^/]+)\/([^/]+)/); if (!match) { // Try simple owner/repo format - match = url.match(/^([^/]+)\/([^/]+)$/); + match = sanitizedUrl.match(/^([^/]+)\/([^/]+)$/); } if (!match) { @@ -45,7 +48,7 @@ export function parseRepositoryUrl(url: string): { } const owner = match[1]; - const repo = match[2].replace(/\.git$/, ""); + const repo = match[2]; return { owner, repo }; } From f2a2a839e62d696c2501f9bfc179850e7c60f658 Mon Sep 17 00:00:00 2001 From: Xavier Krantz Date: Fri, 9 Jan 2026 10:26:32 +0100 Subject: [PATCH 2/4] build: prepare build script before publishing package - Add "prepare" script to run build before publishing Signed-off-by: Xavier Krantz --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 3725c98..a644624 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "build": "tsc", "test": "jest", "test:watch": "jest --watch", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build", + "prepare": "npm run build" }, "homepage": "https://github.com/Jno21/semantic-release-github-commit#readme", "keywords": [ From a29fc9699346a1676deaea644b3690d2ce03b8f8 Mon Sep 17 00:00:00 2001 From: Xavier Krantz Date: Fri, 9 Jan 2026 10:32:59 +0100 Subject: [PATCH 3/4] Update src/utils.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index 0591e42..4949b9f 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -33,7 +33,7 @@ export function parseRepositoryUrl(url: string): { // - https://github.com/owner/repo // - owner/repo - // First, remove `.git` if it exist + // First, remove `.git` if it exists let sanitizedUrl = url.replace(/\.git$/, ""); let match = sanitizedUrl.match(/github\.com[:/]([^/]+)\/([^/]+)/); From 46e30fc9c3f7627433ec051308ed69a2aab30235 Mon Sep 17 00:00:00 2001 From: Xavier Krantz Date: Fri, 9 Jan 2026 11:32:11 +0100 Subject: [PATCH 4/4] Update src/utils.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index 4949b9f..b2473da 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -36,7 +36,7 @@ export function parseRepositoryUrl(url: string): { // First, remove `.git` if it exists let sanitizedUrl = url.replace(/\.git$/, ""); - let match = sanitizedUrl.match(/github\.com[:/]([^/]+)\/([^/]+)/); + let match = sanitizedUrl.match(/github\.com[:/]([^/]+)\/([^/?#]+)/); if (!match) { // Try simple owner/repo format