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 {
13
13
}
14
14
15
15
consola . setReporters ( new SimpleReporter ( ) )
16
- const octokit = new Octokit ( )
16
+ const octokit = new Octokit ( {
17
+ auth : `token ${ process . env . GITHUB_API_TOKEN } `
18
+ } )
17
19
18
20
const [ owner , repo ] = process . env . TRAVIS_REPO_SLUG . split ( '/' )
19
21
const ref = process . env . TRAVIS_PULL_REQUEST_SHA
20
22
21
23
const getSuccessfulDeployment = async ( ) => {
22
- octokit . authenticate ( { token : process . env . GITHUB_API_TOKEN , type : 'oauth' } )
23
-
24
24
const { data : { statuses } } = await octokit . repos . getCombinedStatusForRef ( { owner, ref, repo } )
25
25
26
26
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())
32
32
await pWaitFor ( deployed , { interval : 15000 } )
33
33
34
34
const { target_url : targetUrl } = await getSuccessfulDeployment ( )
35
- // eslint-disable-next-line no-console
36
35
consola . log ( targetUrl )
37
36
return targetUrl
38
37
} ) ( )
You can’t perform that action at this time.
0 commit comments