Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
fix: switch status check to be not failed
Browse files Browse the repository at this point in the history
  • Loading branch information
ZackarySantana committed Feb 23, 2024
1 parent 81abcc0 commit 7018fcb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/pages/task/actionButtons/relevantCommits/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { CommitType } from "./types";
import { getLinks, getTaskFromMainlineCommitsQuery } from "./utils";

const { applyStrictRegex } = string;
const { isFinishedTaskStatus } = statuses;
const { isFailedTaskStatus, isFinishedTaskStatus } = statuses;

interface RelevantCommitsProps {
taskId: string;
Expand Down Expand Up @@ -95,11 +95,7 @@ export const RelevantCommits: React.FC<RelevantCommitsProps> = ({ taskId }) => {
LastMainlineCommitQuery,
LastMainlineCommitQueryVariables
>(LAST_MAINLINE_COMMIT, {
skip:
!parentTask ||
!lastPassingTask ||
status === undefined ||
status === TaskStatus.Succeeded,
skip: !parentTask || !lastPassingTask || !isFailedTaskStatus(status),
variables: {
projectIdentifier,
skipOrderNumber: passingOrderNumber + 2,
Expand Down

0 comments on commit 7018fcb

Please sign in to comment.