Documentation
¶
Overview ¶
Package ghpush applies an agent's changeset to GitHub through the Git Data API. The agent works in a network-isolated pod and hands its commit back as structured file contents (envelope.Changeset); the controller replays that changeset as blob → tree → commit → ref calls with a short-lived, single-repository write token — the only place a push credential exists. No git binary and no clone are involved, so the push costs the same on a ten-commit repository as on one with a decade of history.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pusher ¶
type Pusher struct {
// contains filtered or unexported fields
}
Pusher pushes agent changesets through the GitHub API.
func New ¶
New builds a Pusher. baseURL overrides the GitHub API endpoint (GHES, tests); empty means github.com.
func (*Pusher) Push ¶
func (p *Pusher) Push(ctx context.Context, repo ghclient.Repo, token, branch string, cs *envelope.Changeset) error
Push creates one commit from the changeset on top of its base SHA and points branch at it. The short-lived write token lives only for this call and is never persisted.