diff --git a/static/js/directives/components/pages/repo-page/build.tsx b/static/js/directives/components/pages/repo-page/build.tsx index 5d8a30fcd..258dc19bd 100644 --- a/static/js/directives/components/pages/repo-page/build.tsx +++ b/static/js/directives/components/pages/repo-page/build.tsx @@ -26,12 +26,21 @@ export default class Build extends React.Component { ); }); let buildId: string = element.id.split('-')[0]; + let phase: string = element.phase ? element.phase : 'Cannot retrieve phase'; + let started: string = element.started ? element.started : 'Cannot retrieve start date'; + let message: string; + if (element.trigger_metadata && element.trigger_metadata.commit_info && element.trigger_metadata.commit_info.message){ + message = element.trigger_metadata.commit_info.message; + } + else { + message = 'Cannot retrieve message'; + } buildsTable.push( - {element.phase} + {phase} {buildId} - {element.trigger_metadata.commit_info.message} - {moment(element.started).format('l')} + {message} + {moment(started).format('l')} {tags} )