Skip to content

Commit 37a9a63

Browse files
panvaphillipj
authored andcommitted
fix: label doc/api/webcrypto.md as crypto doc
1 parent c9561f4 commit 37a9a63

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

lib/node-labels.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ const exclusiveLabelsMap = new Map([
131131

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

134+
// specific map for webcrypto.md as it should be labeled 'crypto'
135+
[/^doc\/api\/webcrypto.md$/, ['doc', 'crypto']],
134136
// specific map for modules.md as it should be labeled 'module' not 'modules'
135137
[/^doc\/api\/modules.md$/, ['doc', 'module']],
136138
// specific map for esm.md as it should be labeled 'ES Modules' not 'esm'

test/unit/node-labels.test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,16 @@ tap.test('label: "doc" when only ./doc/ files has been changed', (t) => {
4141
t.end()
4242
})
4343

44+
tap.test('label: "doc" and "crypto" when webcrypto docs have been changed', (t) => {
45+
const labels = nodeLabels.resolveLabels([
46+
'doc/api/webcrypto.md'
47+
])
48+
49+
t.same(labels, ['doc', 'crypto'])
50+
51+
t.end()
52+
})
53+
4454
tap.test('label: "doc" & "deprecations" when ./doc/api/deprecations.md has been changed', (t) => {
4555
const labels = nodeLabels.resolveLabels([
4656
'doc/api/deprecations.md'

0 commit comments

Comments
 (0)