From ae06a905e9b298e9a3bf7799768e39aff4a4ff77 Mon Sep 17 00:00:00 2001 From: Ceri Goff Date: Mon, 24 Apr 2023 11:35:13 -0500 Subject: [PATCH] change Labels type to Label Signed-off-by: Ceri Goff --- .../github-pull-requests-board/src/components/Card/Card.tsx | 4 ++-- .../src/components/Card/CardHeader.tsx | 4 ++-- .../src/components/PullRequestCard/PullRequestCard.tsx | 4 ++-- plugins/github-pull-requests-board/src/utils/types.tsx | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/github-pull-requests-board/src/components/Card/Card.tsx b/plugins/github-pull-requests-board/src/components/Card/Card.tsx index 7ffe9c5412..320e166358 100644 --- a/plugins/github-pull-requests-board/src/components/Card/Card.tsx +++ b/plugins/github-pull-requests-board/src/components/Card/Card.tsx @@ -16,7 +16,7 @@ import React, { PropsWithChildren, FunctionComponent } from 'react'; import { Box, Paper, CardActionArea } from '@material-ui/core'; import CardHeader from './CardHeader'; -import { Labels } from '../../utils/types'; +import { Label } from '../../utils/types'; type Props = { title: string; @@ -28,7 +28,7 @@ type Props = { repositoryName: string; isDraft: boolean; repositoryIsArchived: boolean; - labels?: Labels[]; + labels?: Label[]; }; const Card: FunctionComponent = (props: PropsWithChildren) => { diff --git a/plugins/github-pull-requests-board/src/components/Card/CardHeader.tsx b/plugins/github-pull-requests-board/src/components/Card/CardHeader.tsx index 71dcf2a7de..c59349b95f 100644 --- a/plugins/github-pull-requests-board/src/components/Card/CardHeader.tsx +++ b/plugins/github-pull-requests-board/src/components/Card/CardHeader.tsx @@ -19,7 +19,7 @@ import { getElapsedTime } from '../../utils/functions'; import { UserHeader } from '../UserHeader'; import { DraftPrIcon } from '../icons/DraftPr'; import UnarchiveIcon from '@material-ui/icons/Unarchive'; -import { Labels } from '../../utils/types'; +import { Label } from '../../utils/types'; import { useFormClasses } from './styles'; type Props = { @@ -31,7 +31,7 @@ type Props = { repositoryName: string; isDraft: boolean; repositoryIsArchived: boolean; - labels?: Labels[]; + labels?: Label[]; }; const CardHeader: FunctionComponent = (props: Props) => { diff --git a/plugins/github-pull-requests-board/src/components/PullRequestCard/PullRequestCard.tsx b/plugins/github-pull-requests-board/src/components/PullRequestCard/PullRequestCard.tsx index 409a479b58..e9ad2aeab6 100644 --- a/plugins/github-pull-requests-board/src/components/PullRequestCard/PullRequestCard.tsx +++ b/plugins/github-pull-requests-board/src/components/PullRequestCard/PullRequestCard.tsx @@ -19,7 +19,7 @@ import { getChangeRequests, getCommentedReviews, } from '../../utils/functions'; -import { Reviews, Author, Labels } from '../../utils/types'; +import { Reviews, Author, Label } from '../../utils/types'; import { Card } from '../Card'; import { UserHeaderList } from '../UserHeaderList'; @@ -33,7 +33,7 @@ type Props = { repositoryName: string; repositoryIsArchived: boolean; isDraft: boolean; - labels?: Labels[]; + labels?: Label[]; }; const PullRequestCard: FunctionComponent = (props: Props) => { diff --git a/plugins/github-pull-requests-board/src/utils/types.tsx b/plugins/github-pull-requests-board/src/utils/types.tsx index 8a8ba7e171..c82aea9f2d 100644 --- a/plugins/github-pull-requests-board/src/utils/types.tsx +++ b/plugins/github-pull-requests-board/src/utils/types.tsx @@ -76,7 +76,7 @@ export type Repository = { isArchived: boolean; }; -export type Labels = { +export type Label = { id: string; name: string; }; @@ -95,7 +95,7 @@ export type PullRequest = { reviewDecision: ReviewDecision | null; isDraft: boolean; labels: { - nodes: Labels[]; + nodes: Label[]; }; createdAt: string; author: Author;