fix(schema-publisher): include contract changes in GitHub CI check summary#8166
fix(schema-publisher): include contract changes in GitHub CI check summary#8166AreebEhsan wants to merge 5 commits into
Conversation
… output Add a `contractChanges` parameter to `updateGithubCheckRunForSchemaCheck` and pass `null` from all four call sites. This is groundwork for graphql-hive#6954 and introduces no behavior change yet; it mirrors the existing `failedContractCompositionCount` plumbing so contract data can be surfaced in the GitHub schema-check summary in a follow-up. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…all site Populate the new `contractChanges` parameter from `checkResult.state.contracts` at the successful schema-check call site, keeping only contracts that actually changed. The summary builder does not consume this yet, so behavior is unchanged; this isolates the call-site wiring for graphql-hive#6954. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A successful schema check on a composite/federation project could change only a contract (the core composed schema unchanged). The GitHub CI check summary was built solely from the core schema changes, so such a check was reported as "No changes" even though a contract had changed. Extract the success-branch title/summary logic into a pure, injectable helper (`buildSchemaCheckSuccessGithubOutput`) and feed it the per-contract changes plumbed through in the previous commits. "No changes" is now only reported when there are neither core nor contract changes; otherwise the summary lists the core changes followed by a per-contract section. Add unit tests covering: contract-only changes (no longer "No changes"), the genuine no-changes case, null inputs, empty contract change lists, core-only changes, and combined core + contract changes. Fixes graphql-hive#6954 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request refactors the GitHub CI schema-check summary generation to include contract changes. It extracts the success output generation logic into a testable pure function buildSchemaCheckSuccessGithubOutput and adds comprehensive unit tests. This ensures that contract-only changes are correctly reported in the summary instead of showing 'No changes'. I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
n1ru4l
left a comment
There was a problem hiding this comment.
Thank you for the contribution, please fix the CI!
Fixes the `code-style / eslint-and-prettier` CI check on graphql-hive#8166. Runs `prettier --write` on the two files changed by this PR (import order in the test file and a one-line type signature in the helper). Formatting only — no behavior change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Thanks @n1ru4l, I fixed the failing check. It was the `code-style /
eslint-and-prettier` check. I had run ESLint locally but missed running
Prettier on the two changed files.
I ran Prettier on them and pushed `4264507ed`. The changes were formatting
only: import order in the test file and a one-line helper type signature
formatting change. No behavior changed.
Locally, `prettier --check`, ESLint, the ***@***.***/api` unit tests with 97
passing, and `tsc` all pass now.
Thanks for the review!
…On Thu, 16 Jul 2026 at 06:25, Laurin ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Thank you for the contribution, please fix the CI!
—
Reply to this email directly, view it on GitHub
<#8166?email_source=notifications&email_token=AL3VPN3ECNO4PRLRJMRG7O35FCUSHA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTINZRGI3TIMZWGU3KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#pullrequestreview-4712743656>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL3VPN6FC3SYIELZYFDCKED5FCUSHAVCNFSNUABFKJSXA33TNF2G64TZHM2DSMZVGQ4TSNRYHNEXG43VMU5TINZQG4ZTONZQGMY2C5QC>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
the pr is our of sync |
Background
Fixes #6954.
When
hive schema:check --githubruns on a composite/federation project, the GitHub CI check could report "No changes" even though a schema contract had changed (with the core composed schema unchanged). The check summary was built only from the core schema changes, so contract-only changes were dropped and the result was misreported as "No changes".Description
The successful-check summary in
SchemaPublisher.updateGithubCheckRunForSchemaCheckonly received the core schema changes (state.schemaChanges.all); the per-contract changes already present on the check result (state.contracts[].schemaChanges) were never passed through.This PR (API / services —
@hive/api):contractChangesparameter toupdateGithubCheckRunForSchemaCheck, mirroring the existingfailedContractCompositionCountplumbing.checkResult.state.contractsat the successful-check call site, keeping only contracts that actually changed.buildSchemaCheckSuccessGithubOutput. "No changes" is now only reported when there are neither core nor contract changes; otherwise the summary lists the core changes followed by a per-contract section.Behavior is unchanged for every project where no contract changed (the helper is byte-for-byte equivalent to the previous code in those cases). A changeset (
'hive': patch) is included.Checklist