Skip to content

Commit

Permalink
fix(md): hide depends-on icon from the artifacts list (#9037)
Browse files Browse the repository at this point in the history
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
Rani and mergify[bot] committed Mar 26, 2021
1 parent e78f0c4 commit 2129cde
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,11 @@ export const ArtifactRow = ({ isSelected, clickHandler, version: versionInfo, re
);
};

const ignoredConstraintTypes: Array<IConstraint['type']> = ['depends-on'];

type ArtifactStatusList = IStatusBubbleStackProps['statuses'];
function getArtifactStatuses({ environments, lifecycleSteps }: IManagedArtifactVersion): ArtifactStatusList {
const statuses: ArtifactStatusList = [];
// TODO: ask Erik why we are doing this

// NOTE: The order in which entries are added to `statuses` is important. The highest priority
// item must be inserted first.
Expand Down Expand Up @@ -188,7 +189,7 @@ function getArtifactStatuses({ environments, lifecycleSteps }: IManagedArtifactV

environment.constraints?.forEach((constraint: IConstraint) => {
const icon = constraintsManager.getIcon(constraint);
if (constraint.status === 'PENDING') {
if (constraint.status === 'PENDING' && !ignoredConstraintTypes.includes(constraint.type)) {
pendingConstraintIcons.add(icon);
} else if (constraint.status === 'FAIL' || constraint.status === 'OVERRIDE_FAIL') {
failedConstraintIcons.add(icon);
Expand Down

0 comments on commit 2129cde

Please sign in to comment.