Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecCommandFunc ¶ added in v0.12.1
ExecCommandFunc is the function signature matching exec.Command.
type GetCommitsFn ¶
GetCommitsFn is the function type for GetCommits (used for dependency injection).
func DefaultGetCommitsFn ¶ added in v0.12.1
func DefaultGetCommitsFn() GetCommitsFn
DefaultGetCommitsFn returns a GetCommitsFn backed by a real GitLog instance.
type GitLog ¶ added in v0.12.1
type GitLog struct {
ExecCommandFn ExecCommandFunc
// TagPrefix scopes tag resolution to tags matching this prefix.
// Empty means use the latest tag globally.
TagPrefix string
// ModulePath scopes git log to commits touching this directory.
// Empty means no path filtering (all commits).
ModulePath string
}
GitLog retrieves commit messages from a git repository.
func NewGitLog ¶ added in v0.12.1
func NewGitLog() *GitLog
NewGitLog creates a GitLog with the real exec.Command implementation.
func NewGitLogWithScope ¶ added in v0.13.1
NewGitLogWithScope creates a GitLog scoped to a specific module. tagPrefix filters tag resolution (e.g. "<module-name>/v") and modulePath scopes git log to commits touching that directory (e.g. "<module-name>").
Click to show internal directories.
Click to hide internal directories.