File tree Expand file tree Collapse file tree
.github/actions/https-everywhere-labeller Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,12 +76,12 @@ async function run(alexa) {
7676 const pR = context . payload . pull_request ;
7777
7878 try {
79- // if (context.payload.action !== 'opened' || !pR) {
80- // return
81- // }
79+ if ( context . payload . action !== 'opened' || ! pR ) {
80+ console . log ( 'pull request not open' ) ;
81+ return
82+ }
8283
8384 const prNumber = pR . number
84- console . log ( prNumber ) ;
8585
8686 pR . labels . forEach ( element => {
8787 if ( alexaLabels . includes ( element . name ) )
@@ -95,10 +95,8 @@ async function run(alexa) {
9595 const fileList = response . data
9696
9797 fileList . forEach ( file => {
98- console . log ( file . filename ) ;
99- console . log ( minimatch ( file . filename , rulesetGlob ) ) ;
10098 if ( minimatch ( file . filename , rulesetGlob ) ) {
101- console . log ( 'passed match' ) ;
99+ console . log ( 'Passed file match' ) ;
102100
103101 // Look at PR changes directly
104102 let matches = file . patch . match ( / ( ( h o s t ) = " ( [ ^ " ] | " " ) * " ) / g) ;
@@ -121,7 +119,7 @@ async function run(alexa) {
121119 }
122120 }
123121 } else {
124- console . log ( 'failed match' ) ;
122+ console . log ( 'failed file match, exiting ' ) ;
125123 }
126124 } ) ;
127125 } catch ( err ) {
You can’t perform that action at this time.
0 commit comments