Documentation
¶
Index ¶
- func DiscoverLatestTag(repo *git.Repository, firstParent bool) (*version.Version, string, error)
- func GetCommitsSinceTag(repo *git.Repository, tagName string, toRef string, firstParent bool) ([]*object.Commit, error)
- func GetRepositoryName(repo *git.Repository) string
- func OpenRepository(path string) (*git.Repository, error)
- func ParseCommits(commits []*object.Commit) []version.ParsedCommit
- func ParseRepoNameFromURL(url string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscoverLatestTag ¶
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 ¶
ParseRepoNameFromURL extracts owner/repo from a git URL returns "unknown" if parsing fails to avoid leaking raw URLs
Types ¶
This section is empty.