Minor fixes to consmetic build issues in user test PR script
This commit is contained in:
parent
4e24b1b00d
commit
5519027600
|
@ -2,14 +2,14 @@
|
|||
/// <reference lib="es2015.promise" />
|
||||
// Must reference esnext.asynciterable lib, since octokit uses AsyncIterable internally
|
||||
import { Octokit } from "@octokit/rest";
|
||||
import {runSequence} from "./run-sequence";
|
||||
const {runSequence} = require("./run-sequence");
|
||||
|
||||
const userName = process.env.GH_USERNAME;
|
||||
const userName = process.env.GH_USERNAME || "typescript-bot";
|
||||
const reviewers = process.env.REQUESTING_USER ? [process.env.REQUESTING_USER] : ["weswigham", "sandersn", "RyanCavanaugh"];
|
||||
const now = new Date();
|
||||
const masterBranchname = `user-baseline-updates`;
|
||||
const targetBranch = process.env.TARGET_BRANCH || "master";
|
||||
const branchName = process.env.TARGET_FORK.toLowerCase() === "microsoft" && (targetBranch === "master" || targetBranch === "refs/heads/master")
|
||||
const branchName = process.env.TARGET_FORK?.toLowerCase() === "microsoft" && (targetBranch === "master" || targetBranch === "refs/heads/master")
|
||||
? masterBranchname
|
||||
: `user-update-${process.env.TARGET_FORK}-${process.env.TARGET_BRANCH ? "-" + process.env.TARGET_BRANCH : ""}`;
|
||||
const remoteUrl = `https://${process.argv[2]}@github.com/${userName}/TypeScript.git`;
|
||||
|
@ -46,7 +46,7 @@ cc ${reviewers.map(r => "@" + r).join(" ")}`,
|
|||
const num = r.data.number;
|
||||
console.log(`Pull request ${num} created.`);
|
||||
if (!process.env.SOURCE_ISSUE) {
|
||||
await gh.pulls.createReviewRequest({
|
||||
await gh.pulls.requestReviewers({
|
||||
owner: prOwner,
|
||||
repo: "TypeScript",
|
||||
pull_number: num,
|
||||
|
|
Loading…
Reference in a new issue