ghpush

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func New(baseURL string) *Pusher

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL