Skip to content

Commit

Permalink
Fix git remote in cherry pick script (microsoft#46647)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbranch authored and mprobst committed Jan 10, 2022
1 parent 7d3aa9b commit 882b537
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/open-cherry-pick-pr.ts
Original file line number Diff line number Diff line change
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 882b537

Please sign in to comment.