fix(desktop): accept every check conclusion GitHub reports
Closed
AK
1mo ago+84+84+01234567890123456789-3-3-0123456789
What & why
GHPRResponseSchema rejected the STARTUP_FAILURE and STALE check conclusions, and parsePRListResponse drops a pull request whose validation fails, so a pull request with a check run that failed to start vanished from the workspace view.
What changed:
types.ts: addSTARTUP_FAILUREandSTALEto the conclusion enum.pr-resolution.ts:parseChecksandcomputeChecksStatustreatSTARTUP_FAILUREas a failure, matching the host-service mapper in #8963 and the mobile client.STALEstays pending, as in the host-service mapper.parseChecksis exported so the mapping is testable, likecomputeChecksStatus.
The host-service side of the same gap is #8962 / #8963.
Fixes #9141
How I tested it
types.test.ts: the schema accepts both conclusions and keeps both rollup entries.pr-resolution.test.ts:computeChecksStatusreturns failure forSTARTUP_FAILUREalone and beside a success;parseChecksmaps it to failure and leavesSTALEpending.- Without the change the schema tests fail (both
safeParsecalls reject) andparseChecksis missing. bun test src/lib/trpc/routers/workspaces/utils/githubinapps/desktop: 50 pass, 0 fail.bun run lintclean.bun run typecheckclean for@superset/desktop.
Checklist
- PR title follows conventional commits (
type(scope): subject) -
bun run lintpasses, andbun run typecheckpasses for the packages this PR touches. Repo-widebun run typecheckfails onmainin@superset/relayand@superset/sandboxbefore this change, unrelated to it. - "Allow edits from maintainers" is checked on fork PRs
- I have signed the CLA (the bot asks on your first PR)
Summary by cubic
Fixes pull requests with STARTUP_FAILURE or STALE check runs disappearing from the desktop workspace view. GHPRResponseSchema rejected both conclusions, and parsePRListResponse drops a pull request whose validation fails.
Bug Fixes
- Accepts
STARTUP_FAILUREandSTALEin the check conclusion enum. - Maps
STARTUP_FAILUREto failure inparseChecksandcomputeChecksStatus, matching the host-service mapper and the mobile client. - Treats
STALEas pending in bothparseChecksandcomputeChecksStatusso a rollup of only stale runs is not reported as success. - Exports
parseChecksand adds tests for schema acceptance and status mapping.
Summary by CodeRabbit
- Bug Fixes
- GitHub pull request checks now handle startup failures and stale check results more accurately. Startup failures are reported as failed, while stale checks remain pending instead of being misclassified.
- Pull requests containing these check results can now be processed without losing supported status information.