@@ -140,27 +140,6 @@ const notUserFacingPatterns: RegExp[] = [
140140
141141const notUserFacingPatternExceptions : RegExp [ ] = [ / t o o l s \/ a u t o g r a d / g] ;
142142
143- // For in the specified repo, if any file path matches the given regex we will apply the label
144- // corresponding to that file to the PR
145- //
146- // Format: "owner/repo": [
147- // [/regex-for-path1/, "label-to-apply"],
148- // [/regex-for-path2/, "label-to-apply"],
149- // ]
150- const repoSpecificAutoLabels : { [ repo : string ] : [ RegExp , string ] [ ] } = {
151- "pytorch/pytorch" : [
152- [ / a t e n \/ s r c \/ A T e n \/ m p s / gi, "ciflow/mps" ] ,
153- [ / a t e n \/ s r c \/ A T e n \/ n a t i v e \/ m p s / gi, "ciflow/mps" ] ,
154- [ / t o r c h \/ _ i n d u c t o r \/ c o d e g e n \/ m p s .p y / gi, "ciflow/mps" ] ,
155- [ / t o r c h \/ c s r c \/ d i s t r i b u t e d \/ c 1 0 d \/ s y m m _ m e m / gi, "ciflow/h100-symm-mem" ] ,
156- [ / t o r c h \/ d i s t r i b u t e d \/ _ s y m m e t r i c _ m e m o r y / gi, "ciflow/h100-symm-mem" ] ,
157- [ / t e s t \/ d i s t r i b u t e d \/ .* m e m .* / gi, "ciflow/h100-symm-mem" ] ,
158- [ / t e s t \/ t e s t _ m p s .p y / gi, "ciflow/mps" ] ,
159- [ / t e s t \/ i n d u c t o r \/ t e s t _ m p s _ b a s i c .p y / gi, "ciflow/mps" ] ,
160- ] ,
161- "pytorch/fake-test-repo" : [ [ / s o m e f o l d e r / gi, "cool-label" ] ] ,
162- } ;
163-
164143export async function getLabelsFromLabelerConfig (
165144 context : Context ,
166145 labelerConfigTracker : CachedLabelerConfigTracker ,
@@ -208,30 +187,6 @@ export async function getLabelsFromLabelToLabelConfig(
208187 return newLabels ;
209188}
210189
211- function getRepoSpecificLabels (
212- owner : string ,
213- repo : string ,
214- changedFiles : string [ ]
215- ) : string [ ] {
216- var repoKey = owner + "/" + repo ;
217- if ( ! repoSpecificAutoLabels . hasOwnProperty ( repoKey ) ) {
218- return [ ] ;
219- }
220-
221- const config = repoSpecificAutoLabels [ repoKey ] ;
222-
223- const labelsToAdd : string [ ] = [ ] ;
224- for ( const file of changedFiles ) {
225- // check for typical matches
226- for ( const [ regex , label ] of config ) {
227- if ( file . match ( regex ) ) {
228- labelsToAdd . push ( label ) ;
229- }
230- }
231- }
232- return labelsToAdd ;
233- }
234-
235190function TDRolloutIssueParser ( rawSubsText : string ) : object {
236191 const subsText = rawSubsText . replace ( "\r" , "" ) ;
237192 const subsRows = subsText . match ( / ^ \* .+ / gm) ;
@@ -532,10 +487,6 @@ function myBot(app: Probot): void {
532487 }
533488 }
534489
535- // Add a repo specific labels (if any)
536- var repoSpecificLabels = getRepoSpecificLabels ( owner , repo , filesChanged ) ;
537- labelsToAdd . push ( ...repoSpecificLabels ) ;
538-
539490 var labelsFromLabelerConfig = await getLabelsFromLabelerConfig (
540491 context ,
541492 labelerConfigTracker ,
0 commit comments