Skip to content

fix: rolldown, GraphQL PR lookup, non-fatal errors#348

Open
erickzhao wants to merge 1 commit intomasterfrom
erick/rolldown-graphql-error-handling
Open

fix: rolldown, GraphQL PR lookup, non-fatal errors#348
erickzhao wants to merge 1 commit intomasterfrom
erick/rolldown-graphql-error-handling

Conversation

@erickzhao
Copy link
Copy Markdown
Member

Summary

  • Rolldown: Replaced rollup + 3 plugins (@rollup/plugin-commonjs, @rollup/plugin-node-resolve, @rollup/plugin-typescript, tslib) with rolldown for simpler bundling. Added noEmit to tsconfig since rolldown handles output.
  • GraphQL PR lookup: Switched verifyCommitReview from the flaky REST GET /commits/:sha/pulls + listReviews (N+1) to a single GraphQL query using associatedPullRequests. The REST endpoint intermittently returns HTTP 500s or empty arrays for squash-merge commits.
  • Non-fatal error handling: verifyCommitReview errors no longer fail the action via core.setFailed. Instead, they log a core.warning and send a quiet Slack notification (no @channel) with the error and a link to the CI run.
  • tsgo: Switched from typescript to @typescript/native-preview for type checking.

Test plan

  • Verify yarn package produces a single dist/index.js bundle
  • Verify yarn tsgo passes with no errors
  • Test on a push event with a reviewed commit (should pass silently)
  • Test on a push event where GitHub API returns an error (should warn, not fail)
  • Verify the gh api graphql command logged in CI output is copy-pasteable

🤖 Generated with Claude Code

- Replace rollup + 3 plugins with rolldown for simpler bundling
- Switch from flaky REST `/commits/:sha/pulls` to GraphQL
  `associatedPullRequests` for PR association (the REST endpoint
  intermittently returns 500s or empty arrays for squash-merge commits)
- Make `verifyCommitReview` errors non-fatal: warn + notify Slack
  channel (without @channel) instead of failing the action
- Add CI run URL to error messages for easier debugging
- Log the `gh api graphql` command for manual repro from CI logs
- Add `noEmit` to tsconfig (rolldown handles output, not tsc/tsgo)
- Use `@typescript/native-preview` (tsgo) for type checking

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.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.

1 participant