Skip to content

Commit

Permalink
fix(core/pipeline): handle missing trigger fields in importDeliveryCo…
Browse files Browse the repository at this point in the history
…nfig stage (#7933)
  • Loading branch information
Erik Munson authored Feb 22, 2020
1 parent f60dbec commit 03d60e4
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { ExecutionDetailsSection, IExecutionDetailsSectionProps, StageFailureMes
import { IGitTrigger } from 'core/domain';
import { SETTINGS } from 'core/config';

const NOT_FOUND = 'Not found';

export function ImportDeliveryConfigExecutionDetails(props: IExecutionDetailsSectionProps) {
const { stage } = props;
const trigger = props.execution.trigger as IGitTrigger;
Expand All @@ -18,17 +20,17 @@ export function ImportDeliveryConfigExecutionDetails(props: IExecutionDetailsSec
<div className="col-md-12">
<dl className="dl-narrow dl-horizontal">
<dt>SCM</dt>
<dd>{trigger.source}</dd>
<dd>{trigger.source ?? NOT_FOUND}</dd>
<dt>Project</dt>
<dd>{trigger.project}</dd>
<dd>{trigger.project ?? NOT_FOUND}</dd>
<dt>Repository</dt>
<dd>{trigger.slug}</dd>
<dd>{trigger.slug ?? NOT_FOUND}</dd>
<dt>Manifest Path</dt>
<dd>{manifestPath}</dd>
<dd>{manifestPath ?? NOT_FOUND}</dd>
<dt>Branch</dt>
<dd>{trigger.branch}</dd>
<dd>{trigger.branch ?? NOT_FOUND}</dd>
<dt>Commit</dt>
<dd>{trigger.hash.substring(0, 7)}</dd>
<dd>{trigger.hash?.substring(0, 7) ?? NOT_FOUND}</dd>
</dl>
</div>
</div>
Expand Down

0 comments on commit 03d60e4

Please sign in to comment.