Skip to content

chore(ci): surface bun exit code with ::warning:: on failure - #42151

Closed
niStee wants to merge 1 commit into
anomalyco:devfrom
niStee:fix/close-prs-surface-exit-code
Closed

chore(ci): surface bun exit code with ::warning:: on failure#42151
niStee wants to merge 1 commit into
anomalyco:devfrom
niStee:fix/close-prs-surface-exit-code

Conversation

@niStee

@niStee niStee commented Aug 12, 2026

Copy link
Copy Markdown

Summary

Wrap the bun script/github/close-prs.ts invocation in .github/workflows/close-prs.yml so a non-zero exit code emits a ::warning:: annotation visible in the run log.

Fixes #42157

Problem

When the close-prs bun 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.

Fix

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 now the failure reason is visible at a glance in the run summary via the ::warning:: annotation.

Verification

  • Pre-commit hooks passed
  • The change is in the workflow YAML, not the TypeScript script itself — no test changes needed
  • Tested on the fork niStee/opencode (same workflow file, same failure mode observed in run Enhance custom commands #13)

Wrap the bun script invocation so a non-zero exit code emits a
::warning:: annotation visible in the run log, making the failure
mode (GraphQL error, token-scope error, unhandled exception) easier
to diagnose without reading the full log.

The exit code is still propagated (exit $exit_code), so the workflow
step still fails — but now the failure reason is visible at a glance
in the run summary.
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Aug 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown
Contributor

Hey! Your PR title ci(close-prs): surface bun exit code with ::warning:: on failure doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@niStee niStee changed the title ci(close-prs): surface bun exit code with ::warning:: on failure chore(ci): surface bun exit code with ::warning:: on failure Aug 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Aug 12, 2026
@github-actions github-actions Bot closed this Aug 12, 2026
@niStee

niStee commented Aug 13, 2026

Copy link
Copy Markdown
Author

@anomalyco not sure what's still missing regarding your contributing guidelines.

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]: close-prs workflow failures are silent in the run log — no ::warning:: annotation

1 participant