From de528ecb727f5e44d95a82926733f0b13f8eea80 Mon Sep 17 00:00:00 2001 From: Haydn Ewers <27211+haydn@users.noreply.github.com> Date: Mon, 19 Dec 2022 14:14:59 +1100 Subject: [PATCH] Add project name to index --- pages/index.page.tsx | 2 ++ utils/linear.ts | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/pages/index.page.tsx b/pages/index.page.tsx index 69955f7..063b710 100644 --- a/pages/index.page.tsx +++ b/pages/index.page.tsx @@ -28,6 +28,7 @@ const IndexPage: NextPage = () => { Key + Project Title Rank @@ -78,6 +79,7 @@ const IndexPage: NextPage = () => { return issue ? ( {issue.identifier} + {issue.projectName} {issue.title} {stats[id].priority.toFixed(2)} diff --git a/utils/linear.ts b/utils/linear.ts index 903ab11..9c40a11 100644 --- a/utils/linear.ts +++ b/utils/linear.ts @@ -12,6 +12,7 @@ type IssueSummary = { | "started" | "completed" | "canceled"; + projectName: string | undefined; }; type IssueDetail = { @@ -92,6 +93,9 @@ const getIssues = async ( type } title + project { + name + } } } } @@ -110,6 +114,7 @@ const getIssues = async ( const result = (data?.team?.issues?.edges ?? []).map((edge: any) => ({ ...edge?.node, state: edge?.node.state.type, + projectName: edge?.node.project?.name, })); return data?.team?.issues?.pageInfo?.hasNextPage === true -- 2.51.2