Query Linear issue branchName in GraphQL, map onto Issue

Made-with: Cursor
This commit is contained in:
Denis Darii 2026-04-02 22:17:20 +02:00
parent 1e16afcb67
commit 8d8a1aeb9d
1 changed files with 4 additions and 0 deletions

View File

@ -215,6 +215,7 @@ interface LinearIssueNode {
description: string | null;
url: string;
priority: number;
branchName?: string | null;
state: {
name: string;
type: string; // "triage" | "backlog" | "unstarted" | "started" | "completed" | "canceled"
@ -260,6 +261,7 @@ const ISSUE_FIELDS = `
description
url
priority
branchName
state { name type }
labels { nodes { name } }
assignee { name displayName }
@ -294,6 +296,7 @@ function createLinearTracker(query: GraphQLTransport): Tracker {
labels: node.labels.nodes.map((l) => l.name),
assignee: node.assignee?.displayName ?? node.assignee?.name,
priority: node.priority,
...(node.branchName ? { branchName: node.branchName } : {}),
};
},
@ -426,6 +429,7 @@ function createLinearTracker(query: GraphQLTransport): Tracker {
labels: node.labels.nodes.map((l) => l.name),
assignee: node.assignee?.displayName ?? node.assignee?.name,
priority: node.priority,
...(node.branchName ? { branchName: node.branchName } : {}),
}));
},