prs

package
v0.6.76 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: AGPL-3.0, Apache-2.0, MIT Imports: 21 Imported by: 0

Documentation

Overview

Package prs readies a checkout for a pull request: it writes the title, body and commit message from the changes the box holds, branches off the default branch if needed, commits and pushes. Console opens the pull request.

Index

Constants

View Source
const (
	WriterAIProxy  = "ai_proxy"
	WriterTemplate = "template"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// Checkouts lists the checkouts, thread worktrees included.
	Checkouts func(ctx context.Context) []*devboxv1.Checkout
	// Env is the environment git and the agent CLIs run with (git identity and credentials, CA trust).
	Env       func() []string
	Endpoints func() *devboxv1.HarnessEndpoints
	// Client reaches the AI proxy through egress.
	Client        *http.Client
	Harness       *harness.Config
	RecentPrompts func(threadID string) []string
	Log           *slog.Logger
}

Options wire the preparer to the daemon.

type Preparer

type Preparer struct {
	// contains filtered or unexported fields
}

Preparer serves PreparePullRequest, one at a time per checkout.

func New

func New(opts Options) *Preparer

type Text

type Text struct {
	Branch        string `json:"branch"`
	CommitMessage string `json:"commit_message"`
	Title         string `json:"title"`
	Body          string `json:"body"`
}

Text is what the writer produces. CommitMessage is only used for uncommitted changes.

Jump to

Keyboard shortcuts

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