fix(gate-check-v3): use correct API field for individual check status

Gitea Actions API uses "status" (pending/success/failure) not "state"
for individual status entries. The "state" field is null for pending
runs. This caused all_check_statuses to show Python null instead of
"pending" for queued jobs.

Also verified on PR #391 and PR #393 — individual checks now correctly
display "pending" while combined_state is "pending" (CI_PENDING verdict).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-11 05:32:34 +00:00
committed by Molecule AI Core-BE
parent f470f589c0
commit 9d05335b1a
+3 -1
View File
@@ -304,9 +304,11 @@ def signal_6_ci(pr_number: int, repo: str, branch: str = "main") -> dict:
ci_state = combined.get("state", "null")
# Individual check statuses
# Gitea Actions uses "status" (pending/success/failure) not "state" for
# individual check entries. "state" is null for pending runs.
check_statuses = {}
for s in combined.get("statuses") or []:
check_statuses[s["context"]] = s.get("state", "null")
check_statuses[s["context"]] = s.get("status", "pending")
# Try to get branch protection for required checks
required_checks = []