From 7f8bf0b9c466358cd0032d36e0d3f22183ef966c Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Tue, 2 Nov 2021 12:39:42 -0700 Subject: [PATCH] Fix git remote in cherry pick script (#46647) --- scripts/open-cherry-pick-pr.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/open-cherry-pick-pr.ts b/scripts/open-cherry-pick-pr.ts index 0227a90dc2..07e61b8e3b 100644 --- a/scripts/open-cherry-pick-pr.ts +++ b/scripts/open-cherry-pick-pr.ts @@ -33,9 +33,9 @@ async function main() { const inputPR = (await gh.pulls.get({ pull_number: +process.env.SOURCE_ISSUE, owner: "microsoft", repo: "TypeScript" })).data; let remoteName = "origin"; - if (inputPR.base.repo.git_url !== `git:github.com/microsoft/TypeScript`) { + if (inputPR.base.repo.git_url !== `git:github.com/microsoft/TypeScript` && inputPR.base.repo.git_url !== `git://github.com/microsoft/TypeScript`) { runSequence([ - ["git", ["remote", "add", "nonlocal", inputPR.base.repo.git_url]] + ["git", ["remote", "add", "nonlocal", inputPR.base.repo.git_url.replace(/^git:(?:\/\/)?/, "https://")]] ]); remoteName = "nonlocal"; }