@@ -7,7 +7,6 @@ const unzip = require('unzipper');
77const context = github . context ;
88const minimatch = require ( 'minimatch' ) ;
99const rulesetGlob = new minimatch . Minimatch ( '/src/chrome/content/rules/*.xml' ) ;
10- console . log ( 'say something, anything' ) ;
1110
1211let ProgressBar = require ( 'progress' ) ;
1312let alexaLabels = [ 'top-1m' , 'top-100k' , 'top-10k' , 'top-1k' , 'top-100' ] ;
@@ -72,28 +71,23 @@ function return_label(rank_num) {
7271
7372// Label PR if Needed
7473async function run ( alexa ) {
75- console . log ( 'made it to run' ) ;
76- console . log ( alexa . length ) ;
7774 const token = core . getInput ( 'repo-token' , { required : true } ) ;
7875 const octokit = new github . GitHub ( token ) ;
79- console . log ( octokit ) ;
8076 const pR = context . payload . pull_request ;
8177
8278 try {
83- // if (context.payload.action !== 'opened' || !pR) {
84-
85- // return
86- // }
79+ if ( context . payload . action !== 'opened' || ! pR ) {
80+ return
81+ }
8782
8883 const prNumber = pR . number
89- console . log ( pR . number ) ;
9084
9185 pR . labels . forEach ( element => {
9286 if ( alexaLabels . includes ( element . name ) )
9387 return ;
9488 } ) ;
9589
96- const response = await client . pulls . listFiles ( {
90+ const response = await octokit . pulls . listFiles ( {
9791 ...context . repo ,
9892 pull_number : prNumber
9993 } )
0 commit comments