projectgitops

package
v0.2.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidInput  = errors.New("invalid git operations input")
	ErrCommandFailed = errors.New("git operations command failed")
	ErrDirtyWorktree = errors.New("git operations dirty worktree")
)

Functions

This section is empty.

Types

type Command

type Command struct {
	Path string
	Args []string
	Dir  string
	Env  []string
}

type CommandResult

type CommandResult struct {
	Stdout string
	Stderr string
}

type CommandRunner

type CommandRunner interface {
	Run(context.Context, Command) (CommandResult, error)
}

type Options

type Options struct {
	Enabled                      bool
	CommitAfterTask              bool
	PushAfterTask                bool
	DraftPRAfterPush             bool
	RequireCleanBeforeTask       bool
	CleanupWorktreeAfterPlanDone bool
	RemoteName                   string
	BranchPrefix                 string
	CommitAuthorName             string
	CommitAuthorEmailEnv         string
	CommitAuthorEmailFile        string
	SSHPrivateKeyPath            string
	SSHPublicKeyPath             string
	SSHKnownHostsPath            string
	GitHubTokenEnv               string
	GitHubTokenFile              string
	GitHubCLIPath                string
}

type PostTaskInput

type PostTaskInput struct {
	WorkDir          string
	PlanID           string
	TaskID           string
	AutomationRunID  string
	CommitSubject    string
	CommitBody       string
	AllowedPathspecs []string
}

type PostTaskResult

type PostTaskResult struct {
	Skipped        bool
	NoChanges      bool
	CommitRef      string
	PushRef        string
	PullRequestRef string
	EvidenceRefs   []string
}

type Service

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

func New

func New(options Options) *Service

func NewWithRunner

func NewWithRunner(options Options, runner CommandRunner) *Service

func (*Service) PostTask

func (svc *Service) PostTask(ctx context.Context, input PostTaskInput) (PostTaskResult, error)

func (*Service) PreTask

func (svc *Service) PreTask(ctx context.Context, workDir string) error

Jump to

Keyboard shortcuts

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