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 @@ -5,7 +5,7 @@ const github = require('@actions/github');
55const axios = require ( 'axios' ) ;
66const unzip = require ( 'unzipper' ) ;
77const context = github . context ;
8- const minimatch = require ( 'minimatch' ) . Minimatch ;
8+ const minimatch = require ( 'minimatch' ) ;
99const rulesetGlob = '/src/chrome/content/rules/*.xml' ;
1010
1111let ProgressBar = require ( 'progress' ) ;
@@ -95,13 +95,13 @@ async function run(alexa) {
9595 const fileList = response . data
9696 console . log ( fileList ) ;
9797
98- if ( ! fileList . every ( file => new minimatch . match ( file . filename , rulesetGlob , { matchBase : true } ) ) ) {
98+ if ( ! fileList . every ( file => minimatch ( file . filename , rulesetGlob ) ) ) {
9999 // Don't touch PRs that modify anything except rulesets
100100 console . log ( 'No ruleset files in this PR' ) ;
101101 return ;
102102 } else {
103103 fileList . forEach ( file => {
104- if ( new minimatch . match ( file . filename , rulesetGlob , { matchBase : true } ) ) {
104+ if ( minimatch ( file . filename , rulesetGlob ) ) {
105105 console . log ( 'passed match' ) ;
106106
107107 // Look at PR changes directly
You can’t perform that action at this time.
0 commit comments