fix(github-reporter): Attach Check Runs to PR head - #95
Merged
Conversation
Resolve publish-check SHAs from pull_request.head.sha so PR checks land on the head commit, not the temporary merge GITHUB_SHA. Soft-fail gated steps when a Check Run publishes successfully so that check owns green/red, and document the recommended reporter APIs and workflow patterns.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Require a published Check Run before soft-fail can keep the step green, link details_url to the workflow run page only, and point public docs at the repo github-actions guide instead of a missing site route. Co-Authored-By: David Cramer <david@sentry.io>
Contributor
Author
There was a problem hiding this comment.
Went through the reporter end-to-end (action inputs → gate → Check Run publish → docs).
Looks solid
- PR head SHA resolution order is correct and covered (
sha→GITHUB_PR_HEAD_SHA→ event payload →GITHUB_SHA). - Soft-fail only kicks in after a Check Run actually publishes, so a failed gate cannot go silent if publishing is skipped.
- Success Check Run payload still uses the full job summary (table, scores, quality misses).
- Docs now spell out when to use Check Run vs job-summary-only, per-shard summaries + reducer gate, and who owns green/red.
Follow-ups outside this PR (not blockers)
externalIdis wired in code but not exposed as an action input yet. Fine for now; only needed if we want stable Check Run identity across reruns.- Detached Checks API runs can still group oddly under another github-actions suite in the PR UI. Head SHA + soft-fail fix the functional bugs; grouping is a GitHub platform quirk, not a reporter correctness issue.
- Public docs site still has a thinner GitHub page than the repo
docs/github-actions.mdguide. Link now points at the repo guide; longer-term we may want that content on the site too.
I would ship this as the next reporter minor after CI is green.
dcramer
marked this pull request as ready for review
August 7, 2026 19:39
3 tasks
dcramer
added a commit
that referenced
this pull request
Aug 7, 2026
## Summary Follow-up to #95 for the binary docs gap: bring the public GitHub reporting guide up to parity with `docs/github-actions.md` so implementers get the right APIs/patterns without reading the repo guide. ## What changed - Expanded `packages/docs/src/content/docs/docs/github.mdx` with: - Check Run ownership / soft-fail defaults - PR head SHA resolution order - job-summary-only mode (no detached Checks API entry) - full sharded pattern with per-shard summaries + reducer gate - inputs / outputs tables - recommended ownership patterns - Pointed `/github-actions` redirect at `/docs/github` - Expanded `llms.txt` GitHub section + canonical link - Linked the public page from `docs/github-actions.md` ## Intentionally not in this PR - `externalId` action input (API surface nicety, not docs parity) - CodeQL / detached Checks API suite grouping (GitHub platform behavior when using Checks API + `GITHUB_TOKEN`; not fixed by docs — prefer job-summary-only / real workflow job ownership if you want clean association) ## Test plan - [x] `pnpm docs:check` - [ ] Preview docs page `/docs/github` after Vercel deploy - [ ] Confirm `/github-actions` redirects to `/docs/github` <!-- junior-request-attribution:start --> Requested by **David Cramer**. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AC0B595QDZLL%3A1786129108.273669 --> -- [View Junior Session](https://junior-prod.sentry.dev/conversations/slack%3AC0B595QDZLL%3A1786129108.273669) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0B595QDZLL%3A1786129108.273669/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: David Cramer <david@sentry.io>
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.
Make
publish-checkland on the PR head commit and own PR status cleanly, with docs for the recommended reporter workflow.PR head SHA
On
pull_request, GitHub setsGITHUB_SHAto a temporary merge commit while PR checks attach to head. The reporter now resolves Check Run SHAs as: explicitsha→GITHUB_PR_HEAD_SHA→pull_request.head.sha→GITHUB_SHA.Soft-fail when the check owns status
When a gated Check Run publishes successfully, the action step stays green by default so the Check Run title/conclusion own green/red instead of canned job failure text. If publishing is skipped or fails, the step still fails on a rejected gate. Override with
soft-fail: false.Docs / APIs
Document the SHA order, soft-fail defaults, job-summary-only mode, and per-shard summary + reducer Check Run pattern across
docs/github-actions.md, package README, public docs, andllms.txt. Also setdetails_urlback to the workflow run when available.Checks:
vitestgithub-reporter suite (60), biome format/lint,tsc --noEmit,pnpm docs:check.Requested by David Cramer.
--
View Junior Session [Sentry]