Skip to content

Commit

Permalink
show if deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcasey committed Oct 9, 2024
1 parent e3bc354 commit 509c214
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/scoutgameadmin/components/repos/ReposDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function ReposDashboard({ repos }: { repos: Repo[] }) {
};

return (
<Container maxWidth='lg'>
<Container maxWidth='xl'>
<Typography variant='h4' component='h1' gutterBottom>
Git Repos Dashboard
</Typography>
Expand Down Expand Up @@ -159,6 +159,7 @@ export function ReposDashboard({ repos }: { repos: Repo[] }) {
Contributors
</TableSortLabel>
</TableCell>
<TableCell>Deleted</TableCell>
</TableRow>
</TableHead>
<TableBody>
Expand All @@ -179,6 +180,7 @@ export function ReposDashboard({ repos }: { repos: Repo[] }) {
<TableCell>{repo.prs}</TableCell>
<TableCell>{repo.closedPrs}</TableCell>
<TableCell>{repo.contributors}</TableCell>
<TableCell>{repo.deletedAt ? 'Yes' : 'No'}</TableCell>
</TableRow>
))}
</TableBody>
Expand Down
2 changes: 2 additions & 0 deletions apps/scoutgameadmin/lib/repos/getRepos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { prisma } from '@charmverse/core/prisma-client';

export type Repo = {
createdAt: string;
deletedAt: string | null;
id: number;
name: string;
owner: string;
Expand Down Expand Up @@ -53,6 +54,7 @@ export async function getRepos({ searchString }: { searchString?: string } = {})
});
return repos.map((repo) => ({
createdAt: repo.createdAt.toISOString(),
deletedAt: repo.deletedAt?.toISOString() ?? null,
id: repo.id,
name: repo.name,
owner: repo.owner,
Expand Down

0 comments on commit 509c214

Please sign in to comment.