git

package
v0.32.2 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverLatestTag

func DiscoverLatestTag(repo *git.Repository, firstParent bool) (*version.Version, string, error)

DiscoverLatestTag finds the most recent semver tag in the repository if firstParent is true, only considers tags that are ancestors of HEAD via first-parent

func GetCommitsSinceTag

func GetCommitsSinceTag(repo *git.Repository, tagName string, toRef string, firstParent bool) ([]*object.Commit, error)

GetCommitsSinceTag returns all commits since the given tag (or from beginning if tagName is empty) if firstParent is true, only follows first parent in merge commits toRef specifies the target ref (defaults to HEAD if empty)

func GetRepositoryName

func GetRepositoryName(repo *git.Repository) string

GetRepositoryName attempts to extract the repository name from remote URL

func OpenRepository

func OpenRepository(path string) (*git.Repository, error)

OpenRepository opens a git repository at the given path

func ParseCommits

func ParseCommits(commits []*object.Commit) []version.ParsedCommit

ParseCommits converts git commits to ParsedCommits non-conventional commits are included with Type="other"

func ParseRepoNameFromURL

func ParseRepoNameFromURL(url string) string

ParseRepoNameFromURL extracts owner/repo from a git URL returns "unknown" if parsing fails to avoid leaking raw URLs

Types

This section is empty.

Jump to

Keyboard shortcuts

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