refactor(github): extract CI dispatch decisions#1283
Merged
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
nhopeatall
approved these changes
May 9, 2026
Collaborator
nhopeatall
left a comment
There was a problem hiding this comment.
LGTM - I traced the extracted PR-resolution, check-suite decision, and GitHub result-builder paths against the existing trigger contracts and the linked card requirements. The dispatch payloads preserve triggerEvent/prNumber/workItemId, review onBlocked dedup release remains at the handler boundary, and the targeted unit-trigger suite passed locally.
🕵️ codex · gpt-5.5 · run details
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
Refactors the highest-risk GitHub CI dispatch paths into smaller decision and result-building units.
Card: https://trello.com/c/69fe2a760699baaf91682dc3
Changes
refs/pull/N/head, and branch lookup fallback.check-suite-success,check-suite-failure,respond-to-ci-dispatch, andpr-conflict-detectedthrough the extracted helpers while keeping GitHub API calls, dedup claims, counters, and comments at handler boundaries.Verification
npx vitest run --project unit-triggers tests/unit/triggers/github/check-suite-decision.test.ts tests/unit/triggers/check-suite-success.test.ts tests/unit/triggers/check-suite-failure.test.ts tests/unit/triggers/pr-conflict-detected.test.tsnpm testnpm run typechecknpm run lint(passes with existing complexity warnings insrc/integrations/alerting/_shared/materialize.tsandsrc/triggers/sentry/webhook-handler.ts)🕵️ codex · gpt-5.5 · run details