diff --git a/.changeset/great-ways-switch.md b/.changeset/great-ways-switch.md new file mode 100644 index 0000000000..96469dfade --- /dev/null +++ b/.changeset/great-ways-switch.md @@ -0,0 +1,8 @@ +--- +'@backstage/plugin-github-pull-requests-board': patch +--- + +Add a new "Archived" Filter Options to the Github Pull Requests Dashboard. + +When toggling this option on, the dashboard will display PRs from archived repositories. +These PRs will not be displayed in the default filter. diff --git a/plugins/github-pull-requests-board/src/api/useGetPullRequestDetails.ts b/plugins/github-pull-requests-board/src/api/useGetPullRequestDetails.ts index 3f818c63fc..a276c8fe9d 100644 --- a/plugins/github-pull-requests-board/src/api/useGetPullRequestDetails.ts +++ b/plugins/github-pull-requests-board/src/api/useGetPullRequestDetails.ts @@ -36,6 +36,7 @@ export const useGetPullRequestDetails = () => { owner { login } + isArchived } title url 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 56e8c6a077..3a47fca696 100644 --- a/plugins/github-pull-requests-board/src/components/Card/Card.tsx +++ b/plugins/github-pull-requests-board/src/components/Card/Card.tsx @@ -25,6 +25,8 @@ type Props = { authorName: string; authorAvatar?: string; repositoryName: string; + isDraft: boolean; + repositoryIsArchived: boolean; }; const Card: FunctionComponent = (props: PropsWithChildren) => { @@ -36,6 +38,8 @@ const Card: FunctionComponent = (props: PropsWithChildren) => { authorName, authorAvatar, repositoryName, + isDraft, + repositoryIsArchived, children, } = props; @@ -51,6 +55,8 @@ const Card: FunctionComponent = (props: PropsWithChildren) => { authorName={authorName} authorAvatar={authorAvatar} repositoryName={repositoryName} + isDraft={isDraft} + repositoryIsArchived={repositoryIsArchived} /> {children} 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 831423a464..bb6f3e564d 100644 --- a/plugins/github-pull-requests-board/src/components/Card/CardHeader.tsx +++ b/plugins/github-pull-requests-board/src/components/Card/CardHeader.tsx @@ -14,9 +14,11 @@ * limitations under the License. */ import React, { FunctionComponent } from 'react'; -import { Typography, Box } from '@material-ui/core'; +import { Typography, Box, Tooltip } from '@material-ui/core'; import { getElapsedTime } from '../../utils/functions'; import { UserHeader } from '../UserHeader'; +import { DraftPrIcon } from '../icons/DraftPr'; +import UnarchiveIcon from '@material-ui/icons/Unarchive'; type Props = { title: string; @@ -25,6 +27,8 @@ type Props = { authorName: string; authorAvatar?: string; repositoryName: string; + isDraft: boolean; + repositoryIsArchived: boolean; }; const CardHeader: FunctionComponent = (props: Props) => { @@ -35,6 +39,8 @@ const CardHeader: FunctionComponent = (props: Props) => { authorName, authorAvatar, repositoryName, + isDraft, + repositoryIsArchived, } = props; return ( @@ -45,6 +51,22 @@ const CardHeader: FunctionComponent = (props: Props) => { + + {isDraft && ( + + + + + + )} + {repositoryIsArchived && ( + + + + + + )} + {title} diff --git a/plugins/github-pull-requests-board/src/components/EntityTeamPullRequestsCard/EntityTeamPullRequestsCard.test.tsx b/plugins/github-pull-requests-board/src/components/EntityTeamPullRequestsCard/EntityTeamPullRequestsCard.test.tsx new file mode 100644 index 0000000000..4965e1fbba --- /dev/null +++ b/plugins/github-pull-requests-board/src/components/EntityTeamPullRequestsCard/EntityTeamPullRequestsCard.test.tsx @@ -0,0 +1,257 @@ +/* + * Copyright 2023 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import React from 'react'; +import { EntityTeamPullRequestsCard } from '../EntityTeamPullRequestsCard'; +import { PullRequestsColumn } from '../../utils/types'; +import { render } from '@testing-library/react'; +import { fireEvent } from '@testing-library/react'; + +jest.mock('../../hooks/useUserRepositoriesAndTeam', () => { + return { + useUserRepositoriesAndTeam: () => { + return { + loading: false, + repositories: ['team-login/team-repo'], + teamMembers: ['team-member'], + teamMembersOrganization: 'test-org', + }; + }, + }; +}); + +jest.mock('../../hooks/usePullRequestsByTeam', () => { + const buildPullRequest = ( + prTitle: string, + authorLogin: string, + repoName: string, + isDraft: boolean, + isArchived: boolean, + ) => { + return { + id: 'id', + title: prTitle, + url: 'url', + lastEditedAt: 'last-edited-at', + latestReviews: { + nodes: [], + }, + mergeable: true, + state: 'state', + reviewDecision: null, + createdAt: 'created-at', + repository: { + name: repoName, + owner: { + login: 'team-login', + }, + isArchived: isArchived, + }, + isDraft: isDraft, + author: { + login: authorLogin, + avatarUrl: 'avatar-url', + id: 'id', + email: 'email', + name: 'name', + }, + }; + }; + + const pullRequests: PullRequestsColumn[] = [ + { + title: 'column', + content: [ + buildPullRequest( + 'non-team-non-draft-non-archive', + 'non-team-member', + 'team-repo', + false, + false, + ), + buildPullRequest( + 'non-team-non-draft-is-archive', + 'non-team-member', + 'team-repo', + false, + true, + ), + buildPullRequest( + 'non-team-is-draft-non-archive', + 'non-team-member', + 'team-repo', + true, + false, + ), + buildPullRequest( + 'non-team-is-draft-is-archive', + 'non-team-member', + 'team-repo', + true, + true, + ), + buildPullRequest( + 'is-team-non-draft-non-archive', + 'team-member', + 'non-team-repo', + false, + false, + ), + buildPullRequest( + 'is-team-non-draft-is-archive', + 'team-member', + 'non-team-repo', + false, + true, + ), + buildPullRequest( + 'is-team-is-draft-non-archive', + 'team-member', + 'non-team-repo', + true, + false, + ), + buildPullRequest( + 'is-team-is-draft-is-archive', + 'team-member', + 'non-team-repo', + true, + true, + ), + ], + }, + ]; + + return { + usePullRequestsByTeam: () => { + return { + loading: false, + pullRequests: pullRequests, + refreshPullRequest: () => {}, + }; + }, + }; +}); + +describe('EntityTeamPullRequestsCard', () => { + describe('non-team PRs', () => { + describe('non-draft PRs', () => { + it('should show non-team PRs for un-archived repos when archived option is not checked', async () => { + const { getByText, getAllByText, queryAllByTitle } = await render( + , + ); + expect(getByText('non-team-non-draft-non-archive')).toBeInTheDocument(); + expect(getAllByText('team-repo')).toHaveLength(1); + expect(queryAllByTitle('Repository is archived')).toHaveLength(0); + expect(queryAllByTitle('Draft PR')).toHaveLength(0); + }); + + it('should show non-team PRs for archived repos when archived option is checked', async () => { + const { getByText, getAllByText, getByTitle, queryAllByTitle } = + await render(); + const archiveToggle = getByTitle('Show archived repos'); + fireEvent.click(archiveToggle); + expect(getByText('non-team-non-draft-is-archive')).toBeInTheDocument(); + expect(getAllByText('team-repo')).toHaveLength(1); + expect(queryAllByTitle('Repository is archived')).toHaveLength(1); + expect(queryAllByTitle('Draft PR')).toHaveLength(0); + }); + }); + + describe('draft PRs', () => { + it('should show draft non-team PRs for un-archived repos when archived option is not checked', async () => { + const { getByText, getAllByText, getByTitle, queryAllByTitle } = + await render(); + const draftToggle = getByTitle('Show draft PRs'); + fireEvent.click(draftToggle); + expect(getByText('non-team-is-draft-non-archive')).toBeInTheDocument(); + expect(getAllByText('team-repo')).toHaveLength(1); + expect(queryAllByTitle('Repository is archived')).toHaveLength(0); + expect(queryAllByTitle('Draft PR')).toHaveLength(1); + }); + + it('should show draft non-team PRs for archived repos when archived option is checked', async () => { + const { getByText, getAllByText, getByTitle, queryAllByTitle } = + await render(); + const draftToggle = getByTitle('Show draft PRs'); + fireEvent.click(draftToggle); + const archiveToggle = getByTitle('Show archived repos'); + fireEvent.click(archiveToggle); + expect(getByText('non-team-is-draft-is-archive')).toBeInTheDocument(); + expect(getAllByText('team-repo')).toHaveLength(1); + expect(queryAllByTitle('Repository is archived')).toHaveLength(1); + expect(queryAllByTitle('Draft PR')).toHaveLength(1); + }); + }); + }); + + describe('team PRs', () => { + describe('non-draft PRs', () => { + it('should show team PRs for un-archived repos when archived option is not checked', async () => { + const { getByText, getAllByText, getByTitle, queryAllByTitle } = + await render(); + const teamToggle = getByTitle('Show PRs from your team'); + fireEvent.click(teamToggle); + expect(getByText('is-team-non-draft-non-archive')).toBeInTheDocument(); + expect(getAllByText('non-team-repo')).toHaveLength(1); + expect(queryAllByTitle('Repository is archived')).toHaveLength(0); + expect(queryAllByTitle('Draft PR')).toHaveLength(0); + }); + + it('should show team PRs for archived repos when archived option is checked', async () => { + const { getByText, getAllByText, getByTitle, queryAllByTitle } = + await render(); + const teamToggle = getByTitle('Show PRs from your team'); + fireEvent.click(teamToggle); + const archiveToggle = getByTitle('Show archived repos'); + fireEvent.click(archiveToggle); + expect(getByText('is-team-non-draft-is-archive')).toBeInTheDocument(); + expect(getAllByText('non-team-repo')).toHaveLength(1); + expect(queryAllByTitle('Repository is archived')).toHaveLength(1); + expect(queryAllByTitle('Draft PR')).toHaveLength(0); + }); + }); + + describe('draft PRs', () => { + it('should show draft team PRs for un-archived repos when archived option is not checked', async () => { + const { getByText, getAllByText, getByTitle, queryAllByTitle } = + await render(); + const teamToggle = getByTitle('Show PRs from your team'); + fireEvent.click(teamToggle); + const draftToggle = getByTitle('Show draft PRs'); + fireEvent.click(draftToggle); + expect(getByText('is-team-is-draft-non-archive')).toBeInTheDocument(); + expect(getAllByText('non-team-repo')).toHaveLength(1); + expect(queryAllByTitle('Repository is archived')).toHaveLength(0); + expect(queryAllByTitle('Draft PR')).toHaveLength(1); + }); + + it('should show draft team PRs for archived repos when archived option is checked', async () => { + const { getByText, getAllByText, getByTitle, queryAllByTitle } = + await render(); + const teamToggle = getByTitle('Show PRs from your team'); + fireEvent.click(teamToggle); + const draftToggle = getByTitle('Show draft PRs'); + fireEvent.click(draftToggle); + const archiveToggle = getByTitle('Show archived repos'); + fireEvent.click(archiveToggle); + expect(getByText('is-team-is-draft-is-archive')).toBeInTheDocument(); + expect(getAllByText('non-team-repo')).toHaveLength(1); + expect(queryAllByTitle('Repository is archived')).toHaveLength(1); + expect(queryAllByTitle('Draft PR')).toHaveLength(1); + }); + }); + }); +}); diff --git a/plugins/github-pull-requests-board/src/components/EntityTeamPullRequestsCard/EntityTeamPullRequestsCard.tsx b/plugins/github-pull-requests-board/src/components/EntityTeamPullRequestsCard/EntityTeamPullRequestsCard.tsx index 95d7745c62..ea605327ab 100644 --- a/plugins/github-pull-requests-board/src/components/EntityTeamPullRequestsCard/EntityTeamPullRequestsCard.tsx +++ b/plugins/github-pull-requests-board/src/components/EntityTeamPullRequestsCard/EntityTeamPullRequestsCard.tsx @@ -29,6 +29,7 @@ import { PRCardFormating } from '../../utils/types'; import { shouldDisplayCard } from '../../utils/functions'; import { DraftPrIcon } from '../icons/DraftPr'; import { useUserRepositoriesAndTeam } from '../../hooks/useUserRepositoriesAndTeam'; +import UnarchiveIcon from '@material-ui/icons/Unarchive'; /** @public */ export interface EntityTeamPullRequestsCardProps { @@ -71,6 +72,11 @@ const EntityTeamPullRequestsCard = (props: EntityTeamPullRequestsCardProps) => { value: 'draft', ariaLabel: 'Show draft PRs', }, + { + icon: , + value: 'archivedRepo', + ariaLabel: 'Show archived repos', + }, { icon: , value: 'fullscreen', @@ -127,6 +133,7 @@ const EntityTeamPullRequestsCard = (props: EntityTeamPullRequestsCardProps) => { url={url} reviews={latestReviews.nodes} repositoryName={repository.name} + repositoryIsArchived={repository.isArchived} isDraft={isDraft} /> ), diff --git a/plugins/github-pull-requests-board/src/components/EntityTeamPullRequestsContent/EntityTeamPullRequestsContent.test.tsx b/plugins/github-pull-requests-board/src/components/EntityTeamPullRequestsContent/EntityTeamPullRequestsContent.test.tsx new file mode 100644 index 0000000000..58faa7fb70 --- /dev/null +++ b/plugins/github-pull-requests-board/src/components/EntityTeamPullRequestsContent/EntityTeamPullRequestsContent.test.tsx @@ -0,0 +1,257 @@ +/* + * Copyright 2023 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import React from 'react'; +import { EntityTeamPullRequestsContent } from '../EntityTeamPullRequestsContent'; +import { PullRequestsColumn } from '../../utils/types'; +import { render } from '@testing-library/react'; +import { fireEvent } from '@testing-library/react'; + +jest.mock('../../hooks/useUserRepositoriesAndTeam', () => { + return { + useUserRepositoriesAndTeam: () => { + return { + loading: false, + repositories: ['team-login/team-repo'], + teamMembers: ['team-member'], + teamMembersOrganization: 'test-org', + }; + }, + }; +}); + +jest.mock('../../hooks/usePullRequestsByTeam', () => { + const buildPullRequest = ( + prTitle: string, + authorLogin: string, + repoName: string, + isDraft: boolean, + isArchived: boolean, + ) => { + return { + id: 'id', + title: prTitle, + url: 'url', + lastEditedAt: 'last-edited-at', + latestReviews: { + nodes: [], + }, + mergeable: true, + state: 'state', + reviewDecision: null, + createdAt: 'created-at', + repository: { + name: repoName, + owner: { + login: 'team-login', + }, + isArchived: isArchived, + }, + isDraft: isDraft, + author: { + login: authorLogin, + avatarUrl: 'avatar-url', + id: 'id', + email: 'email', + name: 'name', + }, + }; + }; + + const pullRequests: PullRequestsColumn[] = [ + { + title: 'column', + content: [ + buildPullRequest( + 'non-team-non-draft-non-archive', + 'non-team-member', + 'team-repo', + false, + false, + ), + buildPullRequest( + 'non-team-non-draft-is-archive', + 'non-team-member', + 'team-repo', + false, + true, + ), + buildPullRequest( + 'non-team-is-draft-non-archive', + 'non-team-member', + 'team-repo', + true, + false, + ), + buildPullRequest( + 'non-team-is-draft-is-archive', + 'non-team-member', + 'team-repo', + true, + true, + ), + buildPullRequest( + 'is-team-non-draft-non-archive', + 'team-member', + 'non-team-repo', + false, + false, + ), + buildPullRequest( + 'is-team-non-draft-is-archive', + 'team-member', + 'non-team-repo', + false, + true, + ), + buildPullRequest( + 'is-team-is-draft-non-archive', + 'team-member', + 'non-team-repo', + true, + false, + ), + buildPullRequest( + 'is-team-is-draft-is-archive', + 'team-member', + 'non-team-repo', + true, + true, + ), + ], + }, + ]; + + return { + usePullRequestsByTeam: () => { + return { + loading: false, + pullRequests: pullRequests, + refreshPullRequest: () => {}, + }; + }, + }; +}); + +describe('EntityTeamPullRequestsContent', () => { + describe('non-team PRs', () => { + describe('non-draft PRs', () => { + it('should show non-team PRs for un-archived repos when archived option is not checked', async () => { + const { getByText, getAllByText, queryAllByTitle } = await render( + , + ); + expect(getByText('non-team-non-draft-non-archive')).toBeInTheDocument(); + expect(getAllByText('team-repo')).toHaveLength(1); + expect(queryAllByTitle('Repository is archived')).toHaveLength(0); + expect(queryAllByTitle('Draft PR')).toHaveLength(0); + }); + + it('should show non-team PRs for archived repos when archived option is checked', async () => { + const { getByText, getAllByText, getByTitle, queryAllByTitle } = + await render(); + const archiveToggle = getByTitle('Show archived repos'); + fireEvent.click(archiveToggle); + expect(getByText('non-team-non-draft-is-archive')).toBeInTheDocument(); + expect(getAllByText('team-repo')).toHaveLength(1); + expect(queryAllByTitle('Repository is archived')).toHaveLength(1); + expect(queryAllByTitle('Draft PR')).toHaveLength(0); + }); + }); + + describe('draft PRs', () => { + it('should show draft non-team PRs for un-archived repos when archived option is not checked', async () => { + const { getByText, getAllByText, getByTitle, queryAllByTitle } = + await render(); + const draftToggle = getByTitle('Show draft PRs'); + fireEvent.click(draftToggle); + expect(getByText('non-team-is-draft-non-archive')).toBeInTheDocument(); + expect(getAllByText('team-repo')).toHaveLength(1); + expect(queryAllByTitle('Repository is archived')).toHaveLength(0); + expect(queryAllByTitle('Draft PR')).toHaveLength(1); + }); + + it('should show draft non-team PRs for archived repos when archived option is checked', async () => { + const { getByText, getAllByText, getByTitle, queryAllByTitle } = + await render(); + const draftToggle = getByTitle('Show draft PRs'); + fireEvent.click(draftToggle); + const archiveToggle = getByTitle('Show archived repos'); + fireEvent.click(archiveToggle); + expect(getByText('non-team-is-draft-is-archive')).toBeInTheDocument(); + expect(getAllByText('team-repo')).toHaveLength(1); + expect(queryAllByTitle('Repository is archived')).toHaveLength(1); + expect(queryAllByTitle('Draft PR')).toHaveLength(1); + }); + }); + }); + + describe('team PRs', () => { + describe('non-draft PRs', () => { + it('should show team PRs for un-archived repos when archived option is not checked', async () => { + const { getByText, getAllByText, getByTitle, queryAllByTitle } = + await render(); + const teamToggle = getByTitle('Show PRs from your team'); + fireEvent.click(teamToggle); + expect(getByText('is-team-non-draft-non-archive')).toBeInTheDocument(); + expect(getAllByText('non-team-repo')).toHaveLength(1); + expect(queryAllByTitle('Repository is archived')).toHaveLength(0); + expect(queryAllByTitle('Draft PR')).toHaveLength(0); + }); + + it('should show team PRs for archived repos when archived option is checked', async () => { + const { getByText, getAllByText, getByTitle, queryAllByTitle } = + await render(); + const teamToggle = getByTitle('Show PRs from your team'); + fireEvent.click(teamToggle); + const archiveToggle = getByTitle('Show archived repos'); + fireEvent.click(archiveToggle); + expect(getByText('is-team-non-draft-is-archive')).toBeInTheDocument(); + expect(getAllByText('non-team-repo')).toHaveLength(1); + expect(queryAllByTitle('Repository is archived')).toHaveLength(1); + expect(queryAllByTitle('Draft PR')).toHaveLength(0); + }); + }); + + describe('draft PRs', () => { + it('should show draft team PRs for un-archived repos when archived option is not checked', async () => { + const { getByText, getAllByText, getByTitle, queryAllByTitle } = + await render(); + const teamToggle = getByTitle('Show PRs from your team'); + fireEvent.click(teamToggle); + const draftToggle = getByTitle('Show draft PRs'); + fireEvent.click(draftToggle); + expect(getByText('is-team-is-draft-non-archive')).toBeInTheDocument(); + expect(getAllByText('non-team-repo')).toHaveLength(1); + expect(queryAllByTitle('Repository is archived')).toHaveLength(0); + expect(queryAllByTitle('Draft PR')).toHaveLength(1); + }); + + it('should show draft team PRs for archived repos when archived option is checked', async () => { + const { getByText, getAllByText, getByTitle, queryAllByTitle } = + await render(); + const teamToggle = getByTitle('Show PRs from your team'); + fireEvent.click(teamToggle); + const draftToggle = getByTitle('Show draft PRs'); + fireEvent.click(draftToggle); + const archiveToggle = getByTitle('Show archived repos'); + fireEvent.click(archiveToggle); + expect(getByText('is-team-is-draft-is-archive')).toBeInTheDocument(); + expect(getAllByText('non-team-repo')).toHaveLength(1); + expect(queryAllByTitle('Repository is archived')).toHaveLength(1); + expect(queryAllByTitle('Draft PR')).toHaveLength(1); + }); + }); + }); +}); diff --git a/plugins/github-pull-requests-board/src/components/EntityTeamPullRequestsContent/EntityTeamPullRequestsContent.tsx b/plugins/github-pull-requests-board/src/components/EntityTeamPullRequestsContent/EntityTeamPullRequestsContent.tsx index 2b4c298e83..662e6f4265 100644 --- a/plugins/github-pull-requests-board/src/components/EntityTeamPullRequestsContent/EntityTeamPullRequestsContent.tsx +++ b/plugins/github-pull-requests-board/src/components/EntityTeamPullRequestsContent/EntityTeamPullRequestsContent.tsx @@ -27,6 +27,7 @@ import { PRCardFormating } from '../../utils/types'; import { shouldDisplayCard } from '../../utils/functions'; import { DraftPrIcon } from '../icons/DraftPr'; import { useUserRepositoriesAndTeam } from '../../hooks/useUserRepositoriesAndTeam'; +import UnarchiveIcon from '@material-ui/icons/Unarchive'; /** @public */ export interface EntityTeamPullRequestsContentProps { @@ -71,6 +72,11 @@ const EntityTeamPullRequestsContent = ( value: 'draft', ariaLabel: 'Show draft PRs', }, + { + icon: , + value: 'archivedRepo', + ariaLabel: 'Show archived repos', + }, ]} /> @@ -119,6 +125,7 @@ const EntityTeamPullRequestsContent = ( url={url} reviews={latestReviews.nodes} repositoryName={repository.name} + repositoryIsArchived={repository.isArchived} isDraft={isDraft} /> ), 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 7e1596f5c2..fa3ce4eb9c 100644 --- a/plugins/github-pull-requests-board/src/components/PullRequestCard/PullRequestCard.tsx +++ b/plugins/github-pull-requests-board/src/components/PullRequestCard/PullRequestCard.tsx @@ -31,6 +31,7 @@ type Props = { url: string; reviews: Reviews; repositoryName: string; + repositoryIsArchived: boolean; isDraft: boolean; }; @@ -43,6 +44,7 @@ const PullRequestCard: FunctionComponent = (props: Props) => { url, reviews, repositoryName, + repositoryIsArchived, isDraft, } = props; @@ -50,17 +52,17 @@ const PullRequestCard: FunctionComponent = (props: Props) => { const commentsReviews = getCommentedReviews(reviews); const changeRequests = getChangeRequests(reviews); - const cardTitle = isDraft ? `🔧 DRAFT - ${title}` : title; - return ( {!!approvedReviews.length && (