Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: label doc/api/webcrypto.md as crypto doc #291

Merged
merged 1 commit into from
Feb 5, 2021
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
2 changes: 2 additions & 0 deletions lib/node-labels.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ const exclusiveLabelsMap = new Map([

[/^test\//, 'test'],

// specific map for webcrypto.md as it should be labeled 'crypto'
[/^doc\/api\/webcrypto.md$/, ['doc', 'crypto']],
// specific map for modules.md as it should be labeled 'module' not 'modules'
[/^doc\/api\/modules.md$/, ['doc', 'module']],
// specific map for esm.md as it should be labeled 'ES Modules' not 'esm'
Expand Down
10 changes: 10 additions & 0 deletions test/unit/node-labels.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ tap.test('label: "doc" when only ./doc/ files has been changed', (t) => {
t.end()
})

tap.test('label: "doc" and "crypto" when webcrypto docs have been changed', (t) => {
const labels = nodeLabels.resolveLabels([
'doc/api/webcrypto.md'
])

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

t.end()
})

tap.test('label: "doc" & "deprecations" when ./doc/api/deprecations.md has been changed', (t) => {
const labels = nodeLabels.resolveLabels([
'doc/api/deprecations.md'
Expand Down