From 2427e94287679fbc358439f87a6abd8c67a511de Mon Sep 17 00:00:00 2001
From: nekketsuuu <nekketsuuu@users.noreply.github.com>
Date: Mon, 10 Oct 2022 21:09:34 +0900
Subject: [PATCH] Use server hostname for org-id-style SSH URLs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

GitHub Enterprise Server can show a SSH URLs that includes organization ID, too: https://docs.github.com/en/enterprise-server@3.6/organizations/managing-git-access-to-your-organizations-repositories/about-ssh-certificate-authorities#about-ssh-urls-with-ssh-certificates

Follow-up: ec3a7ce113134d7a93b817d10a8272cb61118579

🔗 https://github.com/actions/checkout/pull/621
---
 src/git-auth-helper.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/git-auth-helper.ts b/src/git-auth-helper.ts
index 3c6db8e..0b86645 100644
--- a/src/git-auth-helper.ts
+++ b/src/git-auth-helper.ts
@@ -67,7 +67,7 @@ class GitAuthHelper {
     this.insteadOfValues.push(`git@${serverUrl.hostname}:`)
     if (this.settings.workflowOrganizationId) {
       this.insteadOfValues.push(
-        `org-${this.settings.workflowOrganizationId}@github.com:`
+        `org-${this.settings.workflowOrganizationId}@${serverUrl.hostname}:`
       )
     }
   }