MCPcopy
hub / github.com/openclaw/clawsweeper / ensureImpactLabel

Function ensureImpactLabel

src/clawsweeper.ts:10567–10587  ·  view source on GitHub ↗
(name: ImpactLabelName)

Source from the content-addressed store, hash-verified

10565}
10566
10567function ensureImpactLabel(name: ImpactLabelName): void {
10568 const definition = IMPACT_LABELS.find((label) => label.name === name);
10569 if (!definition) return;
10570 try {
10571 ghWithRetry(
10572 [
10573 "label",
10574 "create",
10575 definition.name,
10576 "--color",
10577 definition.color,
10578 "--description",
10579 definition.description,
10580 ],
10581 2,
10582 );
10583 } catch (error) {
10584 const message = error instanceof Error ? error.message : String(error);
10585 if (!/already exists/i.test(message)) throw error;
10586 }
10587}
10588
10589function ensureMergeRiskLabel(name: MergeRiskLabelName): void {
10590 const definition = MERGE_RISK_LABELS.find((label) => label.name === name);

Callers 1

syncImpactLabelsFunction · 0.85

Calls 1

ghWithRetryFunction · 0.85

Tested by

no test coverage detected