Fix git remote in cherry pick script (#46647)
This commit is contained in:
parent
7cbcfeea99
commit
7f8bf0b9c4
|
@ -33,9 +33,9 @@ async function main() {
|
||||||
|
|
||||||
const inputPR = (await gh.pulls.get({ pull_number: +process.env.SOURCE_ISSUE, owner: "microsoft", repo: "TypeScript" })).data;
|
const inputPR = (await gh.pulls.get({ pull_number: +process.env.SOURCE_ISSUE, owner: "microsoft", repo: "TypeScript" })).data;
|
||||||
let remoteName = "origin";
|
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([
|
runSequence([
|
||||||
["git", ["remote", "add", "nonlocal", inputPR.base.repo.git_url]]
|
["git", ["remote", "add", "nonlocal", inputPR.base.repo.git_url.replace(/^git:(?:\/\/)?/, "https://")]]
|
||||||
]);
|
]);
|
||||||
remoteName = "nonlocal";
|
remoteName = "nonlocal";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue