diff --git a/lib/node-labels.js b/lib/node-labels.js index b8714504..3197ad5b 100644 --- a/lib/node-labels.js +++ b/lib/node-labels.js @@ -47,6 +47,8 @@ const jsSubsystemList = [ const exclusiveLabelsMap = new Map([ [/^test\//, 'test'], + // specific map for modules.md as it should be labeled 'module' not 'modules' + [/^doc\/api\/modules.md$/, ['doc', 'module']], // automatically tag subsystem-specific API doc changes [/^doc\/api\/(\w+).md$/, ['doc', '$1']], [/^doc\//, 'doc'], diff --git a/test/node-js-subsystem-labels.test.js b/test/node-js-subsystem-labels.test.js index 1ed6f395..0831add2 100644 --- a/test/node-js-subsystem-labels.test.js +++ b/test/node-js-subsystem-labels.test.js @@ -152,3 +152,12 @@ tap.test('label: only "doc" with multiple API doc files changed', (t) => { t.end() }) +tap.test('label: "doc,module" when doc/api/modules.md was changed', (t) => { + const labels = nodeLabels.resolveLabels([ + 'doc/api/modules.md' + ], false) + + t.same(labels, ['doc', 'module']) + + t.end() +})