repo

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCxEcosystemPath

func GetCxEcosystemPath() (string, error)

GetCxEcosystemPath returns the path to the cx ecosystem root. Uses the XDG-compliant paths.DataDir() which respects GROVE_HOME, XDG_DATA_HOME, and falls back to ~/.local/share/grove. This is the parent ecosystem path for all cx-managed bare repos.

Types

type AuditInfo

type AuditInfo struct {
	Status     string    `json:"status"` // "passed", "failed", "not_audited"
	AuditedAt  time.Time `json:"audited_at"`
	ReportPath string    `json:"report_path,omitempty"`
}

type Manager

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

func NewManager

func NewManager() (*Manager, error)

func (*Manager) Ensure

func (m *Manager) Ensure(repoURL string) error

Ensure makes sure the bare clone for the given repository exists and is up-to-date. It does not perform any checkouts. Use EnsureVersion for version-specific worktrees.

func (*Manager) EnsureVersion

func (m *Manager) EnsureVersion(repoURL, version string) (worktreePath string, resolvedCommit string, err error)

EnsureVersion ensures a specific version of a repository is checked out in a worktree. It returns the absolute path to the worktree and the resolved commit hash.

func (*Manager) GetAuditInfo

func (m *Manager) GetAuditInfo(commitHash string) (AuditInfo, bool)

GetAuditInfo returns the audit information for a specific commit hash

func (*Manager) List

func (m *Manager) List() ([]RepoInfo, error)

func (*Manager) LoadManifest

func (m *Manager) LoadManifest() (*Manifest, error)

func (*Manager) Sync

func (m *Manager) Sync() error

func (*Manager) UpdateAuditResult

func (m *Manager) UpdateAuditResult(commitHash, status, reportPath string) error

UpdateAuditResult updates the audit status for a specific commit hash

type Manifest

type Manifest struct {
	Repositories map[string]RepoInfo  `json:"repositories"` // map[repoURL]RepoInfo
	Audits       map[string]AuditInfo `json:"audits"`       // map[commitHash]AuditInfo
}

type RepoInfo

type RepoInfo struct {
	URL       string                  `json:"url"`
	Shorthand string                  `json:"shorthand,omitempty"`
	BarePath  string                  `json:"bare_path"`
	Worktrees map[string]WorktreeInfo `json:"worktrees,omitempty"` // map[commitHash]WorktreeInfo
}

type WorktreeInfo

type WorktreeInfo struct {
	Path      string    `json:"path"`
	Commit    string    `json:"commit"`
	SourceRef string    `json:"source_ref,omitempty"` // The original version string (e.g., "v0.13.0", "main")
	LastUsed  time.Time `json:"last_used"`
}

Jump to

Keyboard shortcuts

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