ship

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package ship implements the validate -> push -> open-PR flow with an optional bounded auto-fix loop.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deps

type Deps struct {
	Worktrees worktree.Manager
	Forge     forge.Forge
	Agent     agent.Launcher
	Runner    *pipeline.Runner
	Repo      domain.Repo
	RepoRoot  string
	Log       *zerolog.Logger
}

Deps are the collaborators ship needs. Forge and Agent may be nil (PR/auto-fix are then skipped/errored accordingly).

type Options

type Options struct {
	Target         string
	Base           string
	Title          string
	Body           string
	Draft          bool
	AutoFix        bool
	MaxFixAttempts int
	Reviewers      []string
	NoPush         bool
}

Options configure a ship run.

type Result

type Result struct {
	Branch      string              `json:"branch"`
	Dir         string              `json:"dir"`
	GatePassed  bool                `json:"gate_passed"`
	Pipeline    pipeline.Result     `json:"pipeline"`
	FixAttempts int                 `json:"fix_attempts"`
	Pushed      bool                `json:"pushed"`
	PR          *domain.PullRequest `json:"pr,omitempty"`
}

Result is the structured outcome of ship.

func Run

func Run(ctx context.Context, d Deps, o Options) (Result, error)

Run executes the gate (with optional auto-fix), then pushes and opens a PR.

Jump to

Keyboard shortcuts

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