chore: Also format scripts and skills.
This commit is contained in:
@@ -36,16 +36,7 @@ for (const label of missing) {
|
||||
const color = pickColor(label);
|
||||
execFileSync(
|
||||
"gh",
|
||||
[
|
||||
"api",
|
||||
"-X",
|
||||
"POST",
|
||||
`repos/${repo}/labels`,
|
||||
"-f",
|
||||
`name=${label}`,
|
||||
"-f",
|
||||
`color=${color}`,
|
||||
],
|
||||
["api", "-X", "POST", `repos/${repo}/labels`, "-f", `name=${label}`, "-f", `color=${color}`],
|
||||
{ stdio: "inherit" },
|
||||
);
|
||||
console.log(`Created label: ${label}`);
|
||||
@@ -97,11 +88,9 @@ function resolveRepo(): string {
|
||||
}
|
||||
|
||||
function fetchExistingLabels(repo: string): Map<string, RepoLabel> {
|
||||
const raw = execFileSync(
|
||||
"gh",
|
||||
["api", `repos/${repo}/labels?per_page=100`, "--paginate"],
|
||||
{ encoding: "utf8" },
|
||||
);
|
||||
const raw = execFileSync("gh", ["api", `repos/${repo}/labels?per_page=100`, "--paginate"], {
|
||||
encoding: "utf8",
|
||||
});
|
||||
const labels = JSON.parse(raw) as RepoLabel[];
|
||||
return new Map(labels.map((label) => [label.name, label]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user