···1717Commands:
1818 setup - Initialize an account as a labeler.
1919 clear - Restore a labeler account to normal.
2020+ recreate - Recreate the labeler declaration (recommended if labels are not showing up).
2021 label add - Add new label declarations to a labeler account.
2122 label delete - Remove label declarations from a labeler account.
2323+ label edit - Bulk edit label definitions.
2224```
23252426For a full guide to setting up a labeler, see [Getting Started](https://skyware.js.org/guides/labeler/introduction/getting-started).
···4547 console.log(`Labeler server listening on ${address}`);
4648 }
4749});
4848-```5050+```
+19
src/bin.ts
···9494 console.error("Error setting up labeler:", error);
9595 }
9696 }
9797+} else if (command === "recreate") {
9898+ const credentials = await promptCredentials();
9999+100100+ const definitions = await getLabelerLabelDefinitions(credentials);
101101+ if (!definitions) {
102102+ console.log("No label definitions found.");
103103+ process.exit(0);
104104+ }
105105+106106+ try {
107107+ await deleteLabelerDeclaration(credentials);
108108+ await declareLabeler(credentials, definitions);
109109+ console.log("Labeler declaration recreated.");
110110+ } catch (error) {
111111+ console.error("Error recreating labeler declaration:", error);
112112+ }
97113} else if (
98114 command === "label"
99115 && (subcommand === "add" || subcommand === "delete" || subcommand === "edit")
···180196 console.log("Commands:");
181197 console.log(" setup - Initialize an account as a labeler.");
182198 console.log(" clear - Restore a labeler account to normal.");
199199+ console.log(
200200+ " recreate - Recreate the labeler declaration (recommended if labels are not showing up).",
201201+ );
183202 console.log(" label add - Add new label declarations to a labeler account.");
184203 console.log(" label delete - Remove label declarations from a labeler account.");
185204 console.log(" label edit - Bulk edit label definitions.");