diff --git a/src/index.ts b/src/index.ts index ffb02b3..b2ad697 100644 --- a/src/index.ts +++ b/src/index.ts @@ -31,7 +31,9 @@ const matchGithub = (url: string | undefined, prop: string) => { const getRangeFromPr = async () => { const {owner, repo, data: pull} = matchGithub(process.env['CIRCLE_PULL_REQUEST'], 'pull') const github = new Octokit() - + if (process.env.GITHUB_TOKEN) + github.authenticate({ type: 'token', token: process.env.GITHUB_TOKEN || '' }) + console.log('📡 Looking up PR #%s...', pull) const {data: {base, head}} = await github.pullRequests.get( {owner, repo, number: +pull}