Skip to content

Comments

fix: handle PRs with no CI checks in dashboard#127

Open
probablyArth wants to merge 3 commits intoComposioHQ:mainfrom
probablyArth:feat/issue-117
Open

fix: handle PRs with no CI checks in dashboard#127
probablyArth wants to merge 3 commits intoComposioHQ:mainfrom
probablyArth:feat/issue-117

Conversation

@probablyArth
Copy link

Summary

Fixes #117

When a PR has no CI checks configured, gh pr checks exits with code 1 and the message "no checks reported on the '<branch>' branch". Previously this was treated as a CI failure, causing the dashboard to show "CI failing" / "CI status unknown" for PRs that simply have no CI.

  • gh() helper: Now extracts stderr from execFileAsync errors (was only reading err.message, which doesn't contain CLI output)
  • getCIChecks: Detects "no checks reported" in the error message and returns [] instead of throwing
  • getCISummary: Maps empty checks array to "none" status (neutral, not failing)

Other real errors (network failures, rate limiting) still fail-closed as "failing" for open PRs.

Test plan

  • getCIChecks returns empty array when gh reports "no checks reported"
  • getCIChecks still throws on real errors (fail-closed)
  • getCISummary returns "none" for the no-checks case
  • Frontend SessionCard shows neutral display (no alert) for ciStatus: "none"
  • Frontend still shows yellow "CI status unknown" when API genuinely fails (ciStatus: "failing" + empty checks)

🤖 Generated with Claude Code

probablyArth and others added 3 commits February 20, 2026 01:08
When a PR has no CI checks, `gh pr checks` exits with code 1 and
"no checks reported on the '<branch>' branch". The gh helper now
detects this message and returns "[]" instead of throwing, so
getCIChecks returns an empty array and getCISummary returns "none".

Closes ComposioHQ#117

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The "no checks reported" handling was too broad in the shared gh()
helper — it could silently return "[]" for unrelated commands like
pr view or pr merge. Moved the detection into getCIChecks's catch
block where it's properly scoped to the pr checks command.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Node's execFileAsync places CLI output in err.stderr, not err.message.
The gh() helper now reads err.stderr and includes it in the re-thrown
error message so callers like getCIChecks can match on CLI output.

Updated mockGhError to reflect real execFileAsync error structure by
placing the error text in err.stderr instead of err.message.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: If there are no CI checks present for a PR, dashboard shows CI failing

1 participant