From 455186f189dd27f58463005180319eb5960bd3ae Mon Sep 17 00:00:00 2001 From: JonoRicci Date: Fri, 30 Jan 2026 14:06:06 +0000 Subject: [PATCH 1/2] fix: add pending status --- __tests__/checks/checks.test.ts | 19 +++++++++++++++++++ src/checks/checks.ts | 1 + src/checks/checksConstants.ts | 1 + 3 files changed, 21 insertions(+) diff --git a/__tests__/checks/checks.test.ts b/__tests__/checks/checks.test.ts index 9f0182f..397e021 100644 --- a/__tests__/checks/checks.test.ts +++ b/__tests__/checks/checks.test.ts @@ -99,6 +99,16 @@ describe("Checks", () => { check_suite: { id: 105 }, app: { id: 1005, slug: "another-app", name: "Another App" }, }, + { + id: 6, + name: "test-check-6", + status: checkStatus.PENDING, + conclusion: null, + started_at: "2022-01-01T00:00:00Z", + completed_at: null, + check_suite: { id: 106 }, + app: { id: 1006, slug: "github-actions", name: "GitHub Actions" }, + }, ]; // Mock own check @@ -441,6 +451,15 @@ describe("Checks", () => { expect(result).toEqual({ in_progress: true, passed: false }); }); + it("should detect pending checks as in_progress", () => { + const checks = new Checks(defaultProps); + const pendingChecks = [mockChecks[5]]; // PENDING check + + const result = checks.evaluateChecksStatus(pendingChecks); + + expect(result).toEqual({ in_progress: true, passed: false }); + }); + it("should handle treatSkippedAsPassed option", () => { // When treatSkippedAsPassed is true const checksWithSkippedAsPassed = new Checks({ diff --git a/src/checks/checks.ts b/src/checks/checks.ts index 4aebe84..92946fe 100644 --- a/src/checks/checks.ts +++ b/src/checks/checks.ts @@ -200,6 +200,7 @@ export default class Checks { checkStatus.IN_PROGRESS, checkStatus.QUEUED, checkStatus.WAITING, + checkStatus.PENDING, ]; let anyInProgressQueuedWaiting = checks.filter((check) => inProgressQueuedWaiting.includes(check.status) diff --git a/src/checks/checksConstants.ts b/src/checks/checksConstants.ts index 7111c04..b1e2f7f 100644 --- a/src/checks/checksConstants.ts +++ b/src/checks/checksConstants.ts @@ -14,6 +14,7 @@ export const checkStatus = { IN_PROGRESS: "in_progress", COMPLETED: "completed", WAITING: "waiting", + PENDING: "pending", }; export const GitHubActionsBotSlug = "github-actions"; From 3f9c781b05d9972dd808c37b1fea7ea3afa636c1 Mon Sep 17 00:00:00 2001 From: JonoRicci Date: Fri, 30 Jan 2026 14:20:34 +0000 Subject: [PATCH 2/2] test: add test for pending status check --- __tests__/checks/checks.test.ts | 2 +- package-lock.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/__tests__/checks/checks.test.ts b/__tests__/checks/checks.test.ts index 397e021..a591dcd 100644 --- a/__tests__/checks/checks.test.ts +++ b/__tests__/checks/checks.test.ts @@ -379,7 +379,7 @@ describe("Checks", () => { await checks.fetchAllChecks(); await checks.filterChecks(); - expect(checks["filteredChecks"]).toHaveLength(4); + expect(checks["filteredChecks"]).toHaveLength(5); expect( checks["filteredChecks"].some((check) => check.name === "test-check-1") ).toBeFalsy(); diff --git a/package-lock.json b/package-lock.json index 53153bd..0a6f90e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "allcheckspassed", - "version": "1.0.0", + "version": "2.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "allcheckspassed", - "version": "1.0.0", + "version": "2.1.0", "license": "MIT", "dependencies": { "@actions/core": "^1.11.1",