File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929 " cli"
3030 ],
3131 "dependencies" : {
32- "@octokit/rest" : " ^16.9.0 " ,
32+ "@octokit/rest" : " ^16.23.2 " ,
3333 "babel-runtime" : " ^6.26.0" ,
34- "commander" : " ^2.19 .0" ,
34+ "commander" : " ^2.20 .0" ,
3535 "http-link-header" : " ^1.0.2" ,
36- "mime-types" : " ^2.1.21 " ,
36+ "mime-types" : " ^2.1.22 " ,
3737 "minimatch" : " ^3.0.4" ,
3838 "url-parse" : " ^1.4.4"
3939 },
4242 "babel-plugin-transform-runtime" : " ^6.23.0" ,
4343 "babel-preset-env" : " ^1.7.0" ,
4444 "babel-preset-stage-0" : " ^6.24.1" ,
45- "tap" : " ^12.1 .1"
45+ "tap" : " ^12.6 .1"
4646 }
4747}
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import pkg from '../package.json';
1313program
1414 . version ( pkg . version )
1515 . usage ( '<command> [<args>]' )
16+ . option ( '--baseurl <baseurl>' , 'API endpoint' , 'https://api.github.com' )
1617 . option ( '-T, --token <token>' , 'OAuth2 token' )
1718 . option ( '-o, --owner <owner>' , 'owner' )
1819 . option ( '-r, --repo <repo>' , 'repo' )
@@ -36,13 +37,10 @@ program.parse(process.argv);
3637
3738const [ command , ...args ] = program . args ;
3839
40+ const token = ( program . token || process . env . GITHUB_TOKEN ) ;
3941const octokit = new Octokit ( {
40- auth ( ) {
41- const token = ( program . token || process . env . GITHUB_TOKEN ) ;
42- if ( token ) {
43- return `token ${ token } ` ;
44- }
45- }
42+ auth : token || null ,
43+ baseUrl : program . baseurl ,
4644} ) ;
4745
4846function next ( response ) {
You can’t perform that action at this time.
0 commit comments