Skip to content

Commit ca83833

Browse files
ZYSzysphillipj
authored andcommitted
labels: add "build" label when .travis.yml changed (nodejs#232)
1 parent 4f4ac43 commit ca83833

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

lib/node-labels.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const subSystemLabelsMap = new Map([
4848
// things that edit top-level .md files are always a doc change
4949
[/^\w+\.md$/, 'doc'],
5050
// different variants of *Makefile and build files
51-
[/^(tools\/)?(Makefile|BSDmakefile|create_android_makefiles)$/, 'build'],
51+
[/^(tools\/)?(Makefile|BSDmakefile|create_android_makefiles|\.travis\.yml)$/, 'build'],
5252
[/^tools\/(install\.py|genv8constants\.py|getnodeversion\.py|js2c\.py|utils\.py|configure\.d\/.*)$/, 'build'],
5353
[/^vcbuild\.bat$/, ['build', 'windows']],
5454
[/^(android-)?configure|node\.gyp|common\.gypi$/, 'build'],

test/unit/node-labels.test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,16 @@ tap.test('label: "build" when ./android-configure has been changed', (t) => {
611611

612612
t.same(labels, ['build'])
613613

614+
t.end()
615+
})
616+
617+
tap.test('label: "build" when ./.travis.yml has been changed', (t) => {
618+
const labels = nodeLabels.resolveLabels([
619+
'.travis.yml'
620+
])
621+
622+
t.same(labels, ['build'])
623+
614624
t.end()
615625
});
616626

0 commit comments

Comments
 (0)