git

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RepositoryFormatRegex = regexp.MustCompile(`^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$`)

repository format should be owner/repo

Functions

func DetectRepository

func DetectRepository() (string, error)

DetectRepository attempts to detect the GitHub repository from .git/config Returns the repository in owner/repo format, or an error if detection fails

func GetGitRepositoryRoot added in v0.3.0

func GetGitRepositoryRoot() (string, error)

GetGitRepositoryRoot finds the root directory of the current git repository Returns the absolute path to the repository root, or an error if not in a git repository

func ValidateRepositoryFormat

func ValidateRepositoryFormat(repo string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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