@@ -117,11 +117,11 @@ const exclusiveLabelsMap = new Map([
117117
118118 // specific map for modules.md as it should be labeled 'module' not 'modules'
119119 [ / ^ d o c \/ a p i \/ m o d u l e s .m d $ / , [ 'doc' , 'module' ] ] ,
120- // automatically tag JS subsystem-specific API doc changes
121- [ / ^ d o c \/ a p i \/ ( \w + ) \. m d $ / , [ 'doc' , '$1' ] ] ,
122120 // n-api is treated separately since it is not a JS core module but is still
123121 // considered a subsystem of sorts
124122 [ / ^ d o c \/ a p i \/ n - a p i .m d $ / , [ 'doc' , 'n-api' , 'dont-land-on-v4.x' , 'dont-land-on-v6.x' ] ] ,
123+ // automatically tag JS subsystem-specific API doc changes
124+ [ / ^ d o c \/ a p i \/ ( \w + ) \. m d $ / , [ 'doc' , '$1' ] ] ,
125125
126126 [ / ^ d o c \/ / , 'doc' ] ,
127127
@@ -183,13 +183,16 @@ function hasAllTestChanges (arr) {
183183function matchExclusiveSubSystem ( filepathsChanged ) {
184184 const isExclusive = filepathsChanged . every ( matchesAnExclusiveLabel )
185185 var labels = matchSubSystemsByRegex ( exclusiveLabelsMap , filepathsChanged )
186+ var nonMetaLabels = labels . filter ( ( label ) => {
187+ return ! / ^ d o n t \- / . test ( label )
188+ } )
186189
187190 // if there are multiple API doc changes, do not apply subsystem tags for now
188191 if ( isExclusive &&
189- labels . includes ( 'doc' ) &&
190- labels . length > 2 &&
192+ nonMetaLabels . includes ( 'doc' ) &&
193+ nonMetaLabels . length > 2 &&
191194 ! hasAllTestChanges ( filepathsChanged ) ) {
192- const nonDocLabels = labels . filter ( ( val ) => {
195+ const nonDocLabels = nonMetaLabels . filter ( ( val ) => {
193196 return val !== 'doc'
194197 } )
195198 if ( hasAllSubsystems ( nonDocLabels ) || hasAllDocChanges ( filepathsChanged ) ) {
0 commit comments