Skip to content

codeSplitters checks: a small GitHub-API shim so external CI can post statuses to us #533

Closed

Description

@QuinnsCode

Why

This is the other half of the webhook compat mode (#532): results coming back. Many CI tools report to GitHub through a configurable "GitHub Enterprise" API base URL. If we answer the couple of endpoints they call, their status reporting lands in our checks (checks.ts) with no plugin to write.

Scope

Mirror just the write paths under a compat prefix (for example /gh/api/v3):

  • POST /repos/:o/:r/statuses/:sha becomes a check run, keyed by context. GitHub's state maps to ours: pending→running, success→passed, failure/error→failed.
  • POST /repos/:o/:r/check-runs and PATCH /repos/:o/:r/check-runs/:id map to recordRun / updateRun.
  • GET /repos/:o/:r/commits/:sha/status and /check-runs, because some tools read back what they wrote.
  • Auth: a repo-scoped token sent as Authorization: token … / Bearer …, the way tools send a GitHub PAT.

Runs made this way get a new runner value, external, so they're told apart from github and our own runners. Required checks gate merges the same way.

Not the whole GitHub API: only what status reporters call.

Done when

  • Tests drive each endpoint the way a GitHub client would, and the runs show up in GET /checks and in the merge gate.
  • The README has a two-line "point your CI here" section.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions