From 95b3db6a81426611aadcfb175e5107554c921680 Mon Sep 17 00:00:00 2001 From: RengarLee Date: Mon, 9 Mar 2026 12:03:48 +0800 Subject: [PATCH] feat: add labels to issue view --json output --- src/utils/linear.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/utils/linear.ts b/src/utils/linear.ts index cd4d2c0c..4bee01d2 100644 --- a/src/utils/linear.ts +++ b/src/utils/linear.ts @@ -170,6 +170,7 @@ export async function fetchIssueDetails( project?: { name: string } | null projectMilestone?: { name: string } | null cycle?: { name?: string | null; number: number } | null + labels?: Array<{ id: string; name: string; color: string }> parent?: { identifier: string title: string @@ -225,6 +226,13 @@ export async function fetchIssueDetails( name number } + labels(first: 50) { + nodes { + id + name + color + } + } parent { identifier title @@ -298,6 +306,13 @@ export async function fetchIssueDetails( name number } + labels(first: 50) { + nodes { + id + name + color + } + } parent { identifier title @@ -338,6 +353,7 @@ export async function fetchIssueDetails( spinner?.stop() return { ...data.issue, + labels: data.issue.labels?.nodes || [], children: data.issue.children?.nodes || [], comments: data.issue.comments?.nodes || [], attachments: data.issue.attachments?.nodes || [], @@ -347,6 +363,7 @@ export async function fetchIssueDetails( spinner?.stop() return { ...data.issue, + labels: data.issue.labels?.nodes || [], children: data.issue.children?.nodes || [], attachments: data.issue.attachments?.nodes || [], }