project

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectGitInfo added in v0.2.4

func DetectGitInfo(ctx context.Context, path string) (registry.GitInfo, error)

DetectGitInfo reads the origin remote of an existing repository, so that a project registered from a directory carries the same Git metadata as one that devvault cloned itself. Those fields are what `devvault doctor` derives its Git host reachability check from — without them the check silently disappears instead of failing.

A directory that is not a Git repository, or a repository without an origin remote, is not an error: such a project is registered without Git metadata. Only an unexpected failure is reported back.

func GitInfoFrom added in v0.2.4

func GitInfoFrom(meta gitmeta.Metadata) registry.GitInfo

GitInfoFrom converts parsed remote metadata into the registry's shape.

Every path that registers a project stores exactly these fields, and internal/doctor builds its Git host checks from them, so the mapping lives in one place instead of once per call site.

func IsGitURL

func IsGitURL(value string) bool

Types

type CloneOptions

type CloneOptions struct {
	URL               string
	TargetDir         string
	BaseDir           string
	Init              bool
	ForceInit         bool
	OpenEditor        bool
	Editor            string
	AllowCustomEditor bool
	Register          bool
	ID                string
	Alias             string
	IncludeReadme     bool
}

type CloneResult

type CloneResult struct {
	Path          string
	Cloned        bool
	Initialized   bool
	EditorMessage string
	ID            string
}

func CloneAndPrepare

func CloneAndPrepare(ctx context.Context, opts CloneOptions) (CloneResult, error)

Jump to

Keyboard shortcuts

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