fix: handle PRs with no CI checks in dashboard#127
Open
probablyArth wants to merge 3 commits intoComposioHQ:mainfrom
Open
fix: handle PRs with no CI checks in dashboard#127probablyArth wants to merge 3 commits intoComposioHQ:mainfrom
probablyArth wants to merge 3 commits intoComposioHQ:mainfrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #117
When a PR has no CI checks configured,
gh pr checksexits 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 extractsstderrfromexecFileAsyncerrors (was only readingerr.message, which doesn't contain CLI output)getCIChecks: Detects "no checks reported" in the error message and returns[]instead of throwinggetCISummary: 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
getCIChecksreturns empty array when gh reports "no checks reported"getCIChecksstill throws on real errors (fail-closed)getCISummaryreturns"none"for the no-checks caseSessionCardshows neutral display (no alert) forciStatus: "none"ciStatus: "failing"+ empty checks)🤖 Generated with Claude Code