gitreview

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 15 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 gitreview implements the explicit local Git review workflow.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotGitRepository       = errors.New("not a git repository")
	ErrBranchExists           = errors.New("branch already exists")
	ErrInvalidManagedFile     = errors.New("file is not a declared managed file")
	ErrNoManagedFiles         = errors.New("managed file list is required")
	ErrIdempotencyConflict    = errors.New("idempotency key conflicts with a different request")
	ErrIdempotencyKeyRequired = errors.New("idempotency key is required")
)

Functions

This section is empty.

Types

type BranchResult

type BranchResult struct {
	Branch   string `json:"branch"`
	Replayed bool   `json:"replayed,omitempty"`
}

type CommitInput

type CommitInput struct {
	Files                   []string
	Message, IdempotencyKey string
}

type CommitResult

type CommitResult struct {
	Commit   string   `json:"commit"`
	Files    []string `json:"files"`
	Replayed bool     `json:"replayed,omitempty"`
}

type CreateBranchInput

type CreateBranchInput struct{ Branch, IdempotencyKey string }

type Manager

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

func Open

func Open(root string, managed []string, executor source.GitExecutor) (*Manager, error)

func (*Manager) Commit

func (m *Manager) Commit(ctx context.Context, input CommitInput) (CommitResult, error)

func (*Manager) CreateBranch

func (m *Manager) CreateBranch(ctx context.Context, input CreateBranchInput) (BranchResult, error)

func (*Manager) Prepare

func (m *Manager) Prepare(ctx context.Context, input PrepareInput) (PrepareResult, error)

func (*Manager) Status

func (m *Manager) Status(ctx context.Context) (Status, error)

type PrepareInput

type PrepareInput struct {
	EnvironmentID string
	Slug          string
	Plan          *plan.Plan
	Validation    *validation.Result
}

type PrepareResult

type PrepareResult struct {
	Status          Status `json:"status"`
	SuggestedBranch string `json:"suggested_branch"`
	CommitMessage   string `json:"commit_message"`
	ReviewMarkdown  string `json:"review_markdown"`
}

type Status

type Status struct {
	Root           string   `json:"root"`
	Branch         string   `json:"branch"`
	Head           string   `json:"head"`
	Dirty          bool     `json:"dirty"`
	ManagedFiles   []string `json:"managed_files"`
	ChangedFiles   []string `json:"changed_files"`
	UnrelatedFiles []string `json:"unrelated_files"`
}

Jump to

Keyboard shortcuts

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