chore: github => octokit in release notes (#16332)
This commit is contained in:
parent
349a3c20ae
commit
826063a2f7
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue