Skip to content

Commit 7f8bf0b

Browse files
authored
Fix git remote in cherry pick script (#46647)
1 parent 7cbcfee commit 7f8bf0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/open-cherry-pick-pr.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ async function main() {
3333

3434
const inputPR = (await gh.pulls.get({ pull_number: +process.env.SOURCE_ISSUE, owner: "microsoft", repo: "TypeScript" })).data;
3535
let remoteName = "origin";
36-
if (inputPR.base.repo.git_url !== `git:github.com/microsoft/TypeScript`) {
36+
if (inputPR.base.repo.git_url !== `git:github.com/microsoft/TypeScript` && inputPR.base.repo.git_url !== `git://github.com/microsoft/TypeScript`) {
3737
runSequence([
38-
["git", ["remote", "add", "nonlocal", inputPR.base.repo.git_url]]
38+
["git", ["remote", "add", "nonlocal", inputPR.base.repo.git_url.replace(/^git:(?:\/\/)?/, "https://")]]
3939
]);
4040
remoteName = "nonlocal";
4141
}

0 commit comments

Comments
 (0)