File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ function github_process_prs(res, pr_cb){
133133 }
134134
135135 var file_fetches = [ ] ;
136+ var newRuleset ;
136137
137138 // Out of the list of files for this PR, figure out the minimum Alexa ranking for each
138139 _ . each ( files , function ( file ) {
@@ -154,9 +155,24 @@ function github_process_prs(res, pr_cb){
154155 }
155156 } ) ;
156157 } ) ;
158+
159+ if ( ! fs . existsSync ( '../../' + file . filename ) ) {
160+ newRuleset = true ;
161+ }
157162 }
158163 } ) ;
159164
165+ if ( newRuleset ) {
166+ console . log ( "Applying label `new-ruleset` to PR: " + pull_request . number ) ;
167+
168+ github . issues . addLabels ( _ . extend ( httpse , {
169+ number : pull_request . number ,
170+ body : [ 'new-ruleset' ]
171+ } ) , function ( err , res ) {
172+ if ( err ) console . log ( err ) ;
173+ } ) ;
174+ }
175+
160176 async . parallel ( file_fetches , function ( err , res ) {
161177 if ( err ) pr_cb ( err ) ;
162178
You can’t perform that action at this time.
0 commit comments