labels: add subsystem label for API doc by mscdex · Pull Request #47 · nodejs/github-bot · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 57 additions & 26 deletions lib/node-labels.js
22 changes: 22 additions & 0 deletions test/node-js-subsystem-labels.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,25 @@ tap.test('label: lib internals without "lib / src" limiting', (t) => {

t.end()
})

tap.test('label: add subsystem when ./doc/api/<subsystem>.md has been changed', (t) => {
const labels = nodeLabels.resolveLabels([
'doc/api/fs.md'
], false)

t.same(labels, ['doc', 'fs'])

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.


t.end()
})

tap.test('label: only "doc" with multiple API doc files changed', (t) => {
const labels = nodeLabels.resolveLabels([
'doc/api/fs.md',
'doc/api/stream.md'
], false)

t.same(labels, ['doc'])

t.end()
})

2 changes: 1 addition & 1 deletion test/node-labels.test.js