Skip to content

Commit

Permalink
Merge pull request #318 from yktakaha4/github-size
Browse files Browse the repository at this point in the history
GitHub size
  • Loading branch information
yktakaha4 authored Feb 20, 2024
2 parents 54c0e4b + e5cfa31 commit a24035e
Show file tree
Hide file tree
Showing 13 changed files with 1,369 additions and 57 deletions.
1 change: 1 addition & 0 deletions src/components/OSSContributions.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jest.mock('@/components/data/ossContributions.json', () => {
url: `https://example.com/user${i}/repo${i}/pull/${i}`,
kind: kinds[i % kinds.length],
mergedAt: date.toISOString(),
changedLines: 8 * i,
repository: {
owner: `user${i}`,
name: `user${i}/repo${i}`,
Expand Down
17 changes: 14 additions & 3 deletions src/components/OSSContributions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { TableHeaders, TableRow } from '@/components/ui/Table';
import {
getOssContributionIcon,
getOSSContributionKindName,
getOSSContributionSizeKindName,
} from '@/constants';
import { SearchableTable } from '@/components/ui/SearchableTable';

Expand All @@ -18,17 +19,17 @@ export const OSSContributions: FC = () => {
{
label: 'タイトル',
align: 'left',
width: '40%',
width: '35%',
},
{
label: 'リポジトリ',
align: 'left',
width: '40%',
width: '35%',
},
{
label: 'タグ',
align: 'left',
width: '10%',
width: '20%',
},
];

Expand Down Expand Up @@ -75,6 +76,16 @@ export const OSSContributions: FC = () => {
value: getOSSContributionKindName(item.kind),
color: 'primary',
},
{
icon: 'prChanges',
value: getOSSContributionSizeKindName(item.changedLines),
color: 'secondary',
},
{
icon: 'star',
value: item.repository.stars.toLocaleString(),
color: 'warning',
},
],
},
];
Expand Down
406 changes: 403 additions & 3 deletions src/components/__snapshots__/OSSContributions.spec.tsx.snap

Large diffs are not rendered by default.

Loading

0 comments on commit a24035e

Please sign in to comment.