From 826063a2f77f77b50fc3779f5214029c7f1f048a Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 8 Jan 2019 16:20:54 -0800 Subject: [PATCH] chore: github => octokit in release notes (#16332) --- script/release-notes/notes.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/script/release-notes/notes.js b/script/release-notes/notes.js index 9d0768854d72..7e29047d16d3 100644 --- a/script/release-notes/notes.js +++ b/script/release-notes/notes.js @@ -6,15 +6,15 @@ const os = require('os') const path = require('path') const { GitProcess } = require('dugite') -const GitHub = require('github') +const octokit = require('@octokit/rest')() const semver = require('semver') const CACHE_DIR = path.resolve(__dirname, '.cache') const NO_NOTES = 'No notes' const FOLLOW_REPOS = [ 'electron/electron', 'electron/libchromiumcontent', 'electron/node' ] -const github = new GitHub() const gitDir = path.resolve(__dirname, '..', '..') -github.authenticate({ type: 'token', token: process.env.ELECTRON_GITHUB_TOKEN }) + +octokit.authenticate({ type: 'token', token: process.env.ELECTRON_GITHUB_TOKEN }) const breakTypes = new Set(['breaking-change']) const docTypes = new Set(['doc', 'docs']) @@ -275,7 +275,7 @@ const getPullRequest = async (number, owner, repo) => { const name = `${owner}-${repo}-pull-${number}` return checkCache(name, async () => { try { - return await github.pullRequests.get({ number, owner, repo }) + return await octokit.pulls.get({ number, owner, repo }) } catch (error) { // Silently eat 404s. // We can get a bad pull number if someone manually lists