Problem
When the close-prs workflow runs bun script/github/close-prs.ts and the script fails (GraphQL pagination error, token-scope error, unhandled exception), the workflow step fails silently — the error is buried in the full log with no visible annotation in the run summary.
This makes diagnosing close-prs failures harder than necessary. The run shows "failed" but you have to download the full log to find the error.
Proposed fix
Wrap the bun invocation so a non-zero exit code emits a ::warning:: annotation:
bun script/github/close-prs.ts "${args[@]}" || {
exit_code=$?
echo "::warning::close-prs.ts exited with code $exit_code — check logs for GraphQL/token-scope errors"
exit $exit_code
}
The exit code is still propagated (exit $exit_code), so the workflow step still fails — but the failure reason is visible at a glance in the run summary via the ::warning:: annotation.
Context
- Workflow file:
.github/workflows/close-prs.yml
- Script:
script/github/close-prs.ts
- Observed on a fork (
niStee/opencode) where the same workflow runs against this upstream repo via --repo argument
Problem
When the
close-prsworkflow runsbun script/github/close-prs.tsand the script fails (GraphQL pagination error, token-scope error, unhandled exception), the workflow step fails silently — the error is buried in the full log with no visible annotation in the run summary.This makes diagnosing close-prs failures harder than necessary. The run shows "failed" but you have to download the full log to find the error.
Proposed fix
Wrap the bun invocation so a non-zero exit code emits a
::warning::annotation:The exit code is still propagated (
exit $exit_code), so the workflow step still fails — but the failure reason is visible at a glance in the run summary via the::warning::annotation.Context
.github/workflows/close-prs.ymlscript/github/close-prs.tsniStee/opencode) where the same workflow runs against this upstream repo via--repoargument