Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ export function PullRequestChecksRow(props: RowProps) {
className="pl-8"
>
{props.pr.state === "open" &&
props.pr.checks.some((check) => check.status === "failure") ? (
props.pr.checks.some(
(check) => check.status === "failure" || check.status === "cancelled",
) ? (
<PullRequestAgentRow {...props} task="feedback" title="Fix failing checks" />
) : null}
{action.available("approve-workflows") ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,8 @@ describe("mobile overview check status", () => {
expect(
pullRequestChecksSummary({ checks: [check("success"), check("pending"), check("failure")] }),
).toMatchObject({ title: "1 check failing", count: "1 of 3" });
expect(
pullRequestChecksSummary({ checks: [check("success"), check("cancelled")] }),
).toMatchObject({ title: "1 check failing", tint: "accent-danger-foreground" });
});
});
4 changes: 3 additions & 1 deletion apps/mobile/src/features/pull-requests/pullRequestStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ export function checkStatus(check: PullRequestCheck) {
}

export function pullRequestChecksSummary(pr: Pick<PullRequestDetail, "checks">) {
const failed = pr.checks.filter((check) => check.status === "failure").length;
const failed = pr.checks.filter(
(check) => check.status === "failure" || check.status === "cancelled",
).length;
const required = pr.checks.filter((check) => check.status === "action-required").length;
const pending = pr.checks.filter((check) => check.status === "pending").length;
const passed = pr.checks.filter((check) => check.status === "success").length;
Expand Down
Loading