diff --git a/checks.js b/checks.js index bc41e1b..53b6384 100644 --- a/checks.js +++ b/checks.js @@ -52,7 +52,7 @@ // name that itself contains a standalone status word (e.g. "error-pages") // is still ambiguous — labels are all GitHub's accessible rows give us. const FAILING_RE = - /\b(fail(?:ed|ing|ure|s)?|error(?:ed|s)?|timed out|cancel(?:l?ed)?|denied|action required)\b/i; + /\b(fail(?:ed|ing|ures?|s)?|error(?:ed|s)?|timed out|cancel(?:l?ed)?|denied|action required)\b/i; const RUNNING_RE = /\b(in[ _]progress|pending|queued|running|waiting|expected)\b/i; const PASSING_RE = /\b(success(?:ful)?|passed|passing)\b/i; diff --git a/test/checks.test.mjs b/test/checks.test.mjs index 8a16d51..8c0996c 100644 --- a/test/checks.test.mjs +++ b/test/checks.test.mjs @@ -83,6 +83,7 @@ describe("deriveChecksState", () => { it("still matches the real inflected status phrases", () => { expect(deriveChecksState(["ci failed after 2m"]).key).toBe("failing"); expect(deriveChecksState(["ci failure"]).key).toBe("failing"); + expect(deriveChecksState(["ci 2 failures"]).key).toBe("failing"); expect(deriveChecksState(["deploy cancelled after 10s"]).key).toBe("failing"); expect(deriveChecksState(["deploy canceled after 10s"]).key).toBe("failing"); expect(deriveChecksState(["lint timed out"]).key).toBe("failing");