Skip to content

Commit

Permalink
Fix git remote in cherry pick script (#46647)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbranch committed Nov 2, 2021
1 parent 7cbcfee commit 7f8bf0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/open-cherry-pick-pr.ts
Expand Up @@ -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";
}
Expand Down

0 comments on commit 7f8bf0b

Please sign in to comment.