Documentation
¶
Index ¶
- Variables
- func Commit(_ context.Context, fileNames []string, message string) error
- func GetCurrentBranch(_ context.Context, path string) (string, error)
- func OpenRepository(path string) (*git.Repository, error)
- type GitCommit
- type GitCommitAuthor
- type GitRepository
- type GitRepositoryWrapper
- func (g GitRepositoryWrapper) GetCurrentBranch(ctx context.Context, s string) (string, error)
- func (g GitRepositoryWrapper) GetRecentCommits(ctx context.Context, basePath string, baseRevision, targetRevision string, ...) ([]GitCommit, error)
- func (g GitRepositoryWrapper) GetVersionInfo(ctx context.Context, path string, branch string) (*GitVersionInfo, error)
- type GitSource
- type GitVersionInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrGitRevisionNotFound = errors.New("git revision not found")
Functions ¶
func OpenRepository ¶
Types ¶
type GitCommit ¶
type GitCommit struct { Commit string Parents []string Author GitCommitAuthor Committer GitCommitAuthor Message string Tags []string }
func GetLastVersionGit ¶
func GetRecentCommits ¶
func GetRecentCommits(ctx context.Context, basePath string, baseRevision, targetRevision string, filterPaths []string) ([]GitCommit, error)
GetRecentCommits returns all commits in descending order (newest first) baseRef is the commit to start from, if empty the current HEAD is used
type GitRepository ¶
type GitRepository interface { GetCurrentBranch(context.Context, string) (string, error) GetVersionInfo(ctx context.Context, path string, branch string) (*GitVersionInfo, error) GetRecentCommits(ctx context.Context, basePath string, baseRevision, targetRevision string, filterPaths []string) ([]GitCommit, error) }
type GitRepositoryWrapper ¶
type GitRepositoryWrapper struct { }
func NewGitRepositoryWrapper ¶
func NewGitRepositoryWrapper() *GitRepositoryWrapper
func (GitRepositoryWrapper) GetCurrentBranch ¶
func (GitRepositoryWrapper) GetRecentCommits ¶
func (GitRepositoryWrapper) GetVersionInfo ¶
func (g GitRepositoryWrapper) GetVersionInfo(ctx context.Context, path string, branch string) (*GitVersionInfo, error)
type GitVersionInfo ¶
func GetVersionInfo ¶
GetVersionInfo returns the latest commit hash of a specific branch
func (*GitVersionInfo) Identifier ¶
func (g *GitVersionInfo) Identifier() string
Click to show internal directories.
Click to hide internal directories.