From ea74ed477cee5cc76bb838a75482f2ab72cf6499 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Tue, 29 Jan 2019 14:01:10 -0800 Subject: [PATCH] Update user pr script for latest version of octokit (#29639) --- scripts/open-user-pr.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/open-user-pr.ts b/scripts/open-user-pr.ts index 68f691235db..f510c63d4e3 100644 --- a/scripts/open-user-pr.ts +++ b/scripts/open-user-pr.ts @@ -1,3 +1,5 @@ +/// +// Must reference esnext.asynciterable lib, since octokit uses AsyncIterable internally import cp = require("child_process"); import Octokit = require("@octokit/rest"); @@ -35,7 +37,7 @@ gh.authenticate({ type: "token", token: process.argv[2] }); -gh.pullRequests.create({ +gh.pulls.create({ owner: process.env.TARGET_FORK, repo: "TypeScript", maintainer_can_modify: true, @@ -50,7 +52,7 @@ cc ${reviewers.map(r => "@" + r).join(" ")}`, }).then(r => { const num = r.data.number; console.log(`Pull request ${num} created.`); - return gh.pullRequests.createReviewRequest({ + return gh.pulls.createReviewRequest({ owner: process.env.TARGET_FORK, repo: "TypeScript", number: num,