mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix: Update config file to address labeller file changes (#10332)
fix: update label script
This commit is contained in:
@@ -70,10 +70,17 @@ export default function generator(plop: PlopTypes.NodePlopAPI): void {
|
||||
type: 'modify',
|
||||
path: `${plop.getDestBasePath()}/../../.github/labeler.yml`,
|
||||
transform(content, answers) {
|
||||
const labelerYAML = parseYAML(content) as Record<string, string[]>;
|
||||
labelerYAML[`packages:${answers.name}`] = [`packages/${answers.name}/*`, `packages/${answers.name}/**/*`];
|
||||
const labelerYAML = parseYAML(content) as Record<string, Record<string, Record<string, string[]>[]>[]>;
|
||||
|
||||
return stringifyYAML(sortYAMLObject(labelerYAML));
|
||||
labelerYAML[`packages:${answers.name}`] = [
|
||||
{
|
||||
'changed-files': [
|
||||
{ 'any-glob-to-any-file': [`packages/${answers.name}/*`, `packages/${answers.name}/**/*`] },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
return stringifyYAML(labelerYAML, { sortMapEntries: true });
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user