Skip to content

shamhub: Implement ChecksByChange with full rollup + runs + URL seeding#1264

Open
ed-irl wants to merge 1 commit into
ed-irl/checks-schemafrom
ed-irl/checks-shamhub
Open

shamhub: Implement ChecksByChange with full rollup + runs + URL seeding#1264
ed-irl wants to merge 1 commit into
ed-irl/checks-schemafrom
ed-irl/checks-shamhub

Conversation

@ed-irl

@ed-irl ed-irl commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Implements the per-change checks API for the in-process forge so
script tests and forge-suite tests can exercise the new payload
without going to a real CI system.

  • shamChange grows ChecksRuns and ChecksURL fields alongside the
    existing ChecksState. Backward compatible: SetChangeChecksState
    still works for tests that only seed a rollup.
  • SetChangeChecks(owner, repo, n, *forge.ChangeChecks) seeds the
    full structure; ChecksByChange(owner, repo, ns) reads it back,
    treating zero-value ChecksState as ChecksNone (no checks
    configured/reported, distinct from passing).
  • New POST /{owner}/{repo}/change/checks-by-change endpoint
    mirrors the comment-counts batch shape. Returns one nil slot
    per unknown change so callers can correlate by index.
  • forgeRepository.ChecksByChange dispatches to the endpoint and
    parses the response back into forge.ChangeChecks.
  • parseChecksState learns 'none' so the wire round-trip matches
    the new ChecksState value added on the schema branch.
  • shamhub test-script CLI gains 'shamhub set-checks <owner/repo>
    ' for seeding rich payloads from .txt scripts.

Implements the per-change checks report for the in-process forge so
script and forge-suite tests can exercise the payload without a real
CI system.

  - shamChange grows a ChecksReport pointer, seeded by SetChangeChecks
    and read back by ChecksByChange (unseeded reports as none).
  - New POST /{owner}/{repo}/change/checks-by-change endpoint mirrors
    the comment-counts batch shape, with a nil slot per unknown change.
  - 'shamhub set-checks <owner/repo> <pr> <json>' seeds rich payloads
    from test scripts.

Lives in checks_report.go; upstream's checks.go (per-check
ChangeChecks) is left untouched.
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