Skip to content

Commit 885defb

Browse files
authored
fix: Update config file to address labeller file changes (discordjs#10332)
fix: update label script
1 parent 4f174c6 commit 885defb

File tree

2 files changed

+70
-23
lines changed

2 files changed

+70
-23
lines changed

.github/labeler.yml

Lines changed: 60 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,100 @@
11
apps:guide:
22
- changed-files:
3-
- any-glob-to-any-file: ['apps/guide/*', 'apps/guide/**/*']
3+
- any-glob-to-any-file:
4+
- apps/guide/*
5+
- apps/guide/**/*
46
apps:website:
57
- changed-files:
6-
- any-glob-to-any-file: ['apps/website/*', 'apps/website/**/*']
8+
- any-glob-to-any-file:
9+
- apps/website/*
10+
- apps/website/**/*
711
packages:api-extractor:
812
- changed-files:
9-
- any-glob-to-any-file: ['packages/api-extractor/*', 'packages/api-extractor/**/*']
13+
- any-glob-to-any-file:
14+
- packages/api-extractor/*
15+
- packages/api-extractor/**/*
1016
packages:api-extractor-model:
1117
- changed-files:
12-
- any-glob-to-any-file: ['packages/api-extractor-model/*', 'packages/api-extractor-model/**/*']
18+
- any-glob-to-any-file:
19+
- packages/api-extractor-model/*
20+
- packages/api-extractor-model/**/*
1321
packages:brokers:
1422
- changed-files:
15-
- any-glob-to-any-file: ['packages/brokers/*', 'packages/brokers/**/*']
23+
- any-glob-to-any-file:
24+
- packages/brokers/*
25+
- packages/brokers/**/*
1626
packages:builders:
1727
- changed-files:
18-
- any-glob-to-any-file: ['packages/builders/*', 'packages/builders/**/*']
28+
- any-glob-to-any-file:
29+
- packages/builders/*
30+
- packages/builders/**/*
1931
packages:collection:
2032
- changed-files:
21-
- any-glob-to-any-file: ['packages/collection/*', 'packages/collection/**/*']
33+
- any-glob-to-any-file:
34+
- packages/collection/*
35+
- packages/collection/**/*
2236
packages:core:
2337
- changed-files:
24-
- any-glob-to-any-file: ['packages/core/*', 'packages/core/**/*']
38+
- any-glob-to-any-file:
39+
- packages/core/*
40+
- packages/core/**/*
2541
packages:create-discord-bot:
2642
- changed-files:
27-
- any-glob-to-any-file: ['packages/create-discord-bot/*', 'packages/create-discord-bot/**/*']
43+
- any-glob-to-any-file:
44+
- packages/create-discord-bot/*
45+
- packages/create-discord-bot/**/*
2846
packages:discord.js:
2947
- changed-files:
30-
- any-glob-to-any-file: ['packages/discord.js/*', 'packages/discord.js/**/*']
48+
- any-glob-to-any-file:
49+
- packages/discord.js/*
50+
- packages/discord.js/**/*
3151
packages:docgen:
3252
- changed-files:
33-
- any-glob-to-any-file: ['packages/docgen/*', 'packages/docgen/**/*']
53+
- any-glob-to-any-file:
54+
- packages/docgen/*
55+
- packages/docgen/**/*
3456
packages:formatters:
3557
- changed-files:
36-
- any-glob-to-any-file: ['packages/formatters/*', 'packages/formatters/**/*']
58+
- any-glob-to-any-file:
59+
- packages/formatters/*
60+
- packages/formatters/**/*
3761
packages:next:
3862
- changed-files:
39-
- any-glob-to-any-file: ['packages/next/*', 'packages/next/**/*']
63+
- any-glob-to-any-file:
64+
- packages/next/*
65+
- packages/next/**/*
4066
packages:proxy:
4167
- changed-files:
42-
- any-glob-to-any-file: ['packages/proxy/*', 'packages/proxy/**/*']
68+
- any-glob-to-any-file:
69+
- packages/proxy/*
70+
- packages/proxy/**/*
4371
packages:proxy-container:
4472
- changed-files:
45-
- any-glob-to-any-file: ['packages/proxy-container/*', 'packages/proxy-container/**/*']
73+
- any-glob-to-any-file:
74+
- packages/proxy-container/*
75+
- packages/proxy-container/**/*
4676
packages:rest:
4777
- changed-files:
48-
- any-glob-to-any-file: ['packages/rest/*', 'packages/rest/**/*']
78+
- any-glob-to-any-file:
79+
- packages/rest/*
80+
- packages/rest/**/*
4981
packages:ui:
5082
- changed-files:
51-
- any-glob-to-any-file: ['packages/ui/*', 'packages/ui/**/*']
83+
- any-glob-to-any-file:
84+
- packages/ui/*
85+
- packages/ui/**/*
5286
packages:util:
5387
- changed-files:
54-
- any-glob-to-any-file: ['packages/util/*', 'packages/util/**/*']
88+
- any-glob-to-any-file:
89+
- packages/util/*
90+
- packages/util/**/*
5591
packages:voice:
5692
- changed-files:
57-
- any-glob-to-any-file: ['packages/voice/*', 'packages/voice/**/*']
93+
- any-glob-to-any-file:
94+
- packages/voice/*
95+
- packages/voice/**/*
5896
packages:ws:
5997
- changed-files:
60-
- any-glob-to-any-file: ['packages/ws/*', 'packages/ws/**/*']
98+
- any-glob-to-any-file:
99+
- packages/ws/*
100+
- packages/ws/**/*

packages/scripts/turbo/generators/config.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,17 @@ export default function generator(plop: PlopTypes.NodePlopAPI): void {
7070
type: 'modify',
7171
path: `${plop.getDestBasePath()}/../../.github/labeler.yml`,
7272
transform(content, answers) {
73-
const labelerYAML = parseYAML(content) as Record<string, string[]>;
74-
labelerYAML[`packages:${answers.name}`] = [`packages/${answers.name}/*`, `packages/${answers.name}/**/*`];
73+
const labelerYAML = parseYAML(content) as Record<string, Record<string, Record<string, string[]>[]>[]>;
7574

76-
return stringifyYAML(sortYAMLObject(labelerYAML));
75+
labelerYAML[`packages:${answers.name}`] = [
76+
{
77+
'changed-files': [
78+
{ 'any-glob-to-any-file': [`packages/${answers.name}/*`, `packages/${answers.name}/**/*`] },
79+
],
80+
},
81+
];
82+
83+
return stringifyYAML(labelerYAML, { sortMapEntries: true });
7784
},
7885
},
7986
{

0 commit comments

Comments
 (0)