From aca9319c7aa70811ea428bbc6082bbda3d13bbda Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 15 Aug 2025 16:44:18 -0700 Subject: [PATCH 1/3] Remove .git suffix from GitHub Actions repo URL --- src/util/git.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/git.ts b/src/util/git.ts index 659a6db0f..d82c2b212 100644 --- a/src/util/git.ts +++ b/src/util/git.ts @@ -58,7 +58,7 @@ export function getGitHubActionsRepoUrl(): string | null { // GITHUB_SERVER_URL defaults to https://github.com but can be different for GitHub Enterprise const serverUrl = process.env.GITHUB_SERVER_URL || "https://github.com"; - return `${serverUrl}/${githubRepository}.git`; + return `${serverUrl}/${githubRepository}`; } /** From e0675e399ab5825ec0e412148612a8e90ec0eda2 Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 15 Aug 2025 16:47:24 -0700 Subject: [PATCH 2/3] fix: tests --- src/util/git.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/git.test.ts b/src/util/git.test.ts index 9f4a32b60..5cca2037d 100644 --- a/src/util/git.test.ts +++ b/src/util/git.test.ts @@ -43,7 +43,7 @@ describe("git utilities - GitHub Actions detection", () => { process.env.GITHUB_ACTIONS = "true"; process.env.GITHUB_REPOSITORY = "owner/repo"; - expect(getGitHubActionsRepoUrl()).toBe("https://github.com/owner/repo.git"); + expect(getGitHubActionsRepoUrl()).toBe("https://github.com/owner/repo"); }); it("should return GitHub URL with custom server", () => { @@ -51,7 +51,7 @@ describe("git utilities - GitHub Actions detection", () => { process.env.GITHUB_REPOSITORY = "owner/repo"; process.env.GITHUB_SERVER_URL = "https://github.enterprise.com"; - expect(getGitHubActionsRepoUrl()).toBe("https://github.enterprise.com/owner/repo.git"); + expect(getGitHubActionsRepoUrl()).toBe("https://github.enterprise.com/owner/repo"); }); }); @@ -63,7 +63,7 @@ describe("git utilities - GitHub Actions detection", () => { // Since we can't easily mock git commands, we'll rely on the fact that // GitHub Actions detection should take priority and return immediately const result = getGitHubActionsRepoUrl(); - expect(result).toBe("https://github.com/owner/repo.git"); + expect(result).toBe("https:/github.com/owner/repo"); }); it("should work with GitHub Enterprise Server", () => { @@ -72,7 +72,7 @@ describe("git utilities - GitHub Actions detection", () => { process.env.GITHUB_SERVER_URL = "https://git.company.com"; const result = getGitHubActionsRepoUrl(); - expect(result).toBe("https://git.company.com/enterprise/repo.git"); + expect(result).toBe("https://git.company.com/enterprise/repo"); }); }); }); \ No newline at end of file From 455e0e241255b74d7bfd423e0116fcab83d56da0 Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 15 Aug 2025 16:47:41 -0700 Subject: [PATCH 3/3] oops --- src/util/git.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/git.test.ts b/src/util/git.test.ts index 5cca2037d..bf50c7ef3 100644 --- a/src/util/git.test.ts +++ b/src/util/git.test.ts @@ -63,7 +63,7 @@ describe("git utilities - GitHub Actions detection", () => { // Since we can't easily mock git commands, we'll rely on the fact that // GitHub Actions detection should take priority and return immediately const result = getGitHubActionsRepoUrl(); - expect(result).toBe("https:/github.com/owner/repo"); + expect(result).toBe("https://github.com/owner/repo"); }); it("should work with GitHub Enterprise Server", () => {