forked from discordjs/discord.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into types/remove-incorrect-messages-property
- Loading branch information
Showing
5 changed files
with
24 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env node | ||
import('../dist/bin/sortLabels.mjs'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { readFile, writeFile } from 'node:fs/promises'; | ||
import { parse as parseYAML, stringify as stringifyYAML } from 'yaml'; | ||
|
||
interface LabelerData { | ||
color: string; | ||
name: string; | ||
} | ||
|
||
const labelsYamlFile = new URL('../../../../.github/labels.yml', import.meta.url); | ||
|
||
const content = await readFile(labelsYamlFile, 'utf8'); | ||
|
||
const labelsYAML = parseYAML(content) as LabelerData[]; | ||
labelsYAML.sort((a, b) => a.name.localeCompare(b.name)); | ||
|
||
await writeFile(labelsYamlFile, stringifyYAML(labelsYAML)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters