Skip to content

Commit

Permalink
Update user pr script for latest version of octokit (#29639)
Browse files Browse the repository at this point in the history
  • Loading branch information
weswigham authored Jan 29, 2019
1 parent cf7cd62 commit ea74ed4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/open-user-pr.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/// <reference lib="esnext.asynciterable" />
// Must reference esnext.asynciterable lib, since octokit uses AsyncIterable internally
import cp = require("child_process");
import Octokit = require("@octokit/rest");

Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit ea74ed4

Please sign in to comment.