Status checks are in an array of commits
Signed-off-by: Thorsten Gilfert <thorsten.gilfert@bbraun.com>
This commit is contained in:
@@ -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>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user