MCPcopy Create free account
hub / github.com/CopilotKit/OpenTag / accentForIssue

Function accentForIssue

app/components/_status.ts:43–55  ·  view source on GitHub ↗
(issue: {
  state?: string;
  priority?: string;
})

Source from the content-addressed store, hash-verified

41 * (done/in-progress/canceled), falling back to Linear purple.
42 */
43export function accentForIssue(issue: {
44 state?: string;
45 priority?: string;
46}): string {
47 const p = (issue.priority ?? "").toLowerCase();
48 if (p.includes("urgent")) return ACCENT.urgent;
49 if (p.includes("high")) return ACCENT.high;
50 const s = (issue.state ?? "").toLowerCase();
51 if (s.includes("done") || s.includes("complete")) return ACCENT.done;
52 if (s.includes("cancel")) return ACCENT.canceled;
53 if (s.includes("progress") || s.includes("started")) return ACCENT.progress;
54 return ACCENT.linear;
55}
56
57/** Accent for a list: surface the hottest priority present, else Linear purple. */
58export function accentForIssues(

Callers 1

IssueCardFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected