ops

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupWorkspaceWorktrees added in v0.3.0

func CleanupWorkspaceWorktrees(input CleanupWorkspaceWorktreesInput) error

func DeriveRepoNameFromURL

func DeriveRepoNameFromURL(url string) string

func RemoveRepo

func RemoveRepo(ctx context.Context, input RemoveRepoInput) (config.WorkspaceConfig, error)

Types

type AddRepoInput

type AddRepoInput struct {
	WorkspaceRoot string
	Name          string
	URL           string
	SourcePath    string
	RepoDir       string
	Defaults      config.Defaults
	Remote        string
	DefaultBranch string
	AllowFallback bool
	Git           git.Client
}

type CleanupWorkspaceWorktreesInput added in v0.3.0

type CleanupWorkspaceWorktreesInput struct {
	WorkspaceRoot string
	Git           git.Client
	Force         bool
	Logf          func(format string, args ...any)
}

type RemoveRepoInput

type RemoveRepoInput struct {
	WorkspaceRoot   string
	Name            string
	Defaults        config.Defaults
	Git             git.Client
	DeleteWorktrees bool
	DeleteLocal     bool
	Force           bool
	Logf            func(format string, args ...any)
}

type RepoBranchSafety

type RepoBranchSafety struct {
	Branch         string
	Path           string
	Dirty          bool
	Missing        bool
	Unmerged       bool
	UnmergedErr    string
	UnmergedReason string
	Unpushed       bool
	UnpushedErr    string
	StatusErr      string
	FetchRemoteErr string
}

type RepoDefaults added in v0.3.0

type RepoDefaults struct {
	Remote        string
	DefaultBranch string
}

type RepoSafetyInput

type RepoSafetyInput struct {
	WorkspaceRoot string
	Repo          config.RepoConfig
	Defaults      config.Defaults
	RepoDefaults  RepoDefaults
	Git           git.Client
	FetchRemotes  bool
}

type RepoSafetyReport

type RepoSafetyReport struct {
	RepoName      string
	Remote        string
	DefaultBranch string
	Branches      []RepoBranchSafety
}

func CheckRepoSafety

func CheckRepoSafety(ctx context.Context, input RepoSafetyInput) (RepoSafetyReport, error)

type RepoStatus

type RepoStatus struct {
	Name    string
	Path    string
	Dirty   bool
	Missing bool
	Err     error
}

func Status

func Status(ctx context.Context, input StatusInput) ([]RepoStatus, error)

type StatusInput

type StatusInput struct {
	WorkspaceRoot       string
	Defaults            config.Defaults
	RepoDefaultBranches map[string]string
	Git                 git.Client
}

type WorkspaceSafetyInput

type WorkspaceSafetyInput struct {
	WorkspaceRoot string
	Defaults      config.Defaults
	RepoDefaults  map[string]RepoDefaults
	Git           git.Client
	FetchRemotes  bool
}

type WorkspaceSafetyReport

type WorkspaceSafetyReport struct {
	Root  string
	Repos []RepoSafetyReport
}

Jump to

Keyboard shortcuts

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