Status checks are in an array of commits

Signed-off-by: Thorsten Gilfert <thorsten.gilfert@bbraun.com>
This commit is contained in:
Thorsten Gilfert
2024-04-08 13:00:40 +00:00
parent 1e5f38046d
commit ae7a775fb8
3 changed files with 12 additions and 8 deletions
@@ -29,7 +29,7 @@ type Props = {
isDraft: boolean;
repositoryIsArchived: boolean;
labels?: Label[];
status?: Status;
status?: Status[];
};
const Card: FunctionComponent<PropsWithChildren<Props>> = (
@@ -37,13 +37,15 @@ const props = {
name: 'documentation',
},
],
status: {
commit: {
statusCheckRollup: {
state: 'SUCCESS',
status: [
{
commit: {
statusCheckRollup: {
state: 'SUCCESS',
},
},
},
},
],
};
describe('<CardHeader/>', () => {
@@ -32,7 +32,7 @@ type Props = {
isDraft: boolean;
repositoryIsArchived: boolean;
labels?: Label[];
status?: Status;
status?: Status[];
};
const CardHeader: FunctionComponent<Props> = (props: Props) => {
@@ -92,7 +92,9 @@ const CardHeader: FunctionComponent<Props> = (props: Props) => {
<Box display="flex" alignItems="center" flexWrap="wrap" paddingTop={1}>
<Typography variant="body2" component="p">
Commit Status:{' '}
<strong>{status.commit.statusCheckRollup?.state || 'N/A'}</strong>
<strong>
{status[0].commit.statusCheckRollup?.state || 'N/A'}
</strong>
</Typography>
</Box>
)}