<commit_before>import * as React from 'react';

import { IExecutionDetailsSectionProps } from 'core/pipeline/config/stages/core';
import { IStage } from 'core/domain';
import { StageFailureMessage } from 'core/delivery/details';
import { robotToHuman } from 'core/presentation/robotToHumanFilter/robotToHuman.filter';
import { timestamp } from 'core/utils/timeFormatters';
import { ExecutionDetailsSection } from '../core';
import { ManualJudgmentApproval } from './ManualJudgmentApproval';

export interface IManualJudgmentExecutionDetailsState {
  parentDeployStage: IStage;
}

export class ManualJudgmentExecutionDetails extends React.Component<IExecutionDetailsSectionProps, IManualJudgmentExecutionDetailsState> {
  public static title = 'manualJudgment';

  constructor(props: IExecutionDetailsSectionProps) {
    super(props);
  }

  public render() {
    const { application, execution, stage, current, name } = this.props;
    const hasJudgment = stage.context.judgmentStatus || ['SKIPPED', 'SUCCEEDED'].includes(stage.status);
    return (
      <ExecutionDetailsSection name={name} current={current}>
        <dl className="no-margin">
          {hasJudgment && <dt key="title">Judgment</dt>}
          {hasJudgment && <dd key="value">{robotToHuman(stage.context.judgmentStatus || 'No judgment made')}</dd>}
          {stage.status === 'SKIPPED' && <dd>Skipped</dd>}
          {stage.context.lastModifiedBy && <dt>Judged By</dt>}
          {stage.context.lastModifiedBy && (
            <dd>
              <span>{stage.context.lastModifiedBy}</span>
              {stage.context.propagateAuthenticationContext && <span> (<em>authentication propagated</em>)</span>}
              <br/>
              {timestamp(stage.endTime)}
            </dd>
          )}

          {stage.context.judgmentInput && <dt>Input</dt>}
          {stage.context.judgmentInput && <dd>{robotToHuman(stage.context.judgmentInput)}</dd>}

        </dl>
        <ManualJudgmentApproval application={application} execution={execution} stage={stage}/>
        <StageFailureMessage stage={stage} message={stage.failureMessage} />
      </ExecutionDetailsSection>
    )
  }
}<commit_msg>fix(core): omit exception message on stopped manual judgment stages (#4357)<commit_after>import * as React from 'react';

import { IExecutionDetailsSectionProps } from 'core/pipeline/config/stages/core';
import { IStage } from 'core/domain';
import { StageFailureMessage } from 'core/delivery/details';
import { robotToHuman } from 'core/presentation/robotToHumanFilter/robotToHuman.filter';
import { timestamp } from 'core/utils/timeFormatters';
import { ExecutionDetailsSection } from '../core';
import { ManualJudgmentApproval } from './ManualJudgmentApproval';

export interface IManualJudgmentExecutionDetailsState {
  parentDeployStage: IStage;
}

export class ManualJudgmentExecutionDetails extends React.Component<IExecutionDetailsSectionProps, IManualJudgmentExecutionDetailsState> {
  public static title = 'manualJudgment';

  constructor(props: IExecutionDetailsSectionProps) {
    super(props);
  }

  public render() {
    const { application, execution, stage, current, name } = this.props;
    const hasJudgment = stage.context.judgmentStatus || ['SKIPPED', 'SUCCEEDED'].includes(stage.status);
    return (
      <ExecutionDetailsSection name={name} current={current}>
        <dl className="no-margin">
          {hasJudgment && <dt key="title">Judgment</dt>}
          {hasJudgment && <dd key="value">{robotToHuman(stage.context.judgmentStatus || 'No judgment made')}</dd>}
          {stage.status === 'SKIPPED' && <dd>Skipped</dd>}
          {stage.context.lastModifiedBy && <dt>Judged By</dt>}
          {stage.context.lastModifiedBy && (
            <dd>
              <span>{stage.context.lastModifiedBy}</span>
              {stage.context.propagateAuthenticationContext && <span> (<em>authentication propagated</em>)</span>}
              <br/>
              {timestamp(stage.endTime)}
            </dd>
          )}

          {stage.context.judgmentInput && <dt>Input</dt>}
          {stage.context.judgmentInput && <dd>{robotToHuman(stage.context.judgmentInput)}</dd>}

        </dl>
        <ManualJudgmentApproval application={application} execution={execution} stage={stage}/>
        {stage.context.judgmentInput && <StageFailureMessage stage={stage} message={stage.failureMessage} />}
      </ExecutionDetailsSection>
    )
  }
}
{'fraction_non_alphanumeric': 0.1345676224881463, 'fraction_numerical': 0.0009031384059607134, 'mean_word_length': 3.804772234273319, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 0, '>': 59, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7255324', 'n_tokens_mistral': 1333, 'n_tokens_neox': 1224, 'n_words': 228}