mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 08:03:30 +01:00
chore: backport-candidate GitHub label (#10623)
* chore: backport-candidate GitHub label * chore: sort label script --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
2
.github/labels.yml
vendored
2
.github/labels.yml
vendored
@@ -10,6 +10,8 @@
|
||||
color: 7ef7ef
|
||||
- name: backport
|
||||
color: 88aabb
|
||||
- name: backport-candidate
|
||||
color: 0075ca
|
||||
- name: blocked
|
||||
color: fc1423
|
||||
- name: bug
|
||||
|
||||
2
packages/scripts/bin/sortLabels.js
Executable file
2
packages/scripts/bin/sortLabels.js
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env node
|
||||
import('../dist/bin/sortLabels.mjs');
|
||||
16
packages/scripts/bin/sortLabels.ts
Normal file
16
packages/scripts/bin/sortLabels.ts
Normal file
@@ -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));
|
||||
@@ -5,13 +5,14 @@
|
||||
"description": "A set of scripts that we use for our workflows",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "tsc --noEmit --lib ESNext,DOM && tsup",
|
||||
"build": "tsc --noEmit --lib ESNext,DOM && tsup",
|
||||
"lint": "prettier --check . && cross-env TIMING=1 eslint --format=pretty src turbo/generators/config.ts",
|
||||
"format": "prettier --write . && cross-env TIMING=1 eslint --fix --format=pretty src turbo/generators/config.ts",
|
||||
"fmt": "pnpm run format"
|
||||
},
|
||||
"bin": {
|
||||
"generate-split-documentation": "./bin/generateSplitDocumentation.js"
|
||||
"generate-split-documentation": "./bin/generateSplitDocumentation.js",
|
||||
"sort-labels": "./bin/sortLabels.js"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
|
||||
@@ -6,7 +6,7 @@ export default [
|
||||
minify: 'terser',
|
||||
}),
|
||||
createTsupConfig({
|
||||
entry: ['src/populateDevDatabaseBranch.ts'],
|
||||
entry: ['src/populateDevDatabaseBranch.ts', 'bin/sortLabels.ts'],
|
||||
format: 'esm',
|
||||
minify: 'terser',
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user