File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -13,14 +13,14 @@ const SimpleReporter = class {
1313}
1414
1515consola . setReporters ( new SimpleReporter ( ) )
16- const octokit = new Octokit ( )
16+ const octokit = new Octokit ( {
17+ auth : `token ${ process . env . GITHUB_API_TOKEN } `
18+ } )
1719
1820const [ owner , repo ] = process . env . TRAVIS_REPO_SLUG . split ( '/' )
1921const ref = process . env . TRAVIS_PULL_REQUEST_SHA
2022
2123const getSuccessfulDeployment = async ( ) => {
22- octokit . authenticate ( { token : process . env . GITHUB_API_TOKEN , type : 'oauth' } )
23-
2424 const { data : { statuses } } = await octokit . repos . getCombinedStatusForRef ( { owner, ref, repo } )
2525
2626 return statuses . find ( ( { context, state } ) => / ^ n e t l i f y \/ .* \/ d e p l o y - p r e v i e w $ / . test ( context ) && state === 'success' )
@@ -32,7 +32,6 @@ const deployed = async () => Boolean(await getSuccessfulDeployment())
3232 await pWaitFor ( deployed , { interval : 15000 } )
3333
3434 const { target_url : targetUrl } = await getSuccessfulDeployment ( )
35- // eslint-disable-next-line no-console
3635 consola . log ( targetUrl )
3736 return targetUrl
3837} ) ( )
You can’t perform that action at this time.
0 commit comments