Documentation
¶
Overview ¶
Package repository stores tools to work with git repository.
Index ¶
- Constants
- type Bumper
- func (r *Bumper) Commit() error
- func (r *Bumper) GetCommits(last bool) ([]*Commit, error)
- func (r *Bumper) GetComparisonCommit(from plumbing.Hash, searchMessage string) (*plumbing.Hash, error)
- func (r *Bumper) GetGit() *git.Repository
- func (r *Bumper) GetRepoName() (string, error)
- func (r *Bumper) IsOwnCommit() bool
- type Commit
Constants ¶
const ( // BumpMessage is bump commit message. BumpMessage = "versions bump" // Author is the name of bump commit author. Author = "Bumper" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bumper ¶
type Bumper struct {
// contains filtered or unexported fields
}
Bumper encapsulates Git-related operations for bumping versions in a Git repository.
func (*Bumper) Commit ¶
Commit stores the current changes to the Git repository with the default commit message and author.
func (*Bumper) GetCommits ¶ added in v2.2.1
GetCommits gets a list of commits before Bump.
func (*Bumper) GetComparisonCommit ¶
func (r *Bumper) GetComparisonCommit(from plumbing.Hash, searchMessage string) (*plumbing.Hash, error)
GetComparisonCommit returns the commit that contains the specified search message.
func (*Bumper) GetGit ¶
func (r *Bumper) GetGit() *git.Repository
GetGit returns internal *git.Repository
func (*Bumper) GetRepoName ¶
GetRepoName retrieves the name of the remote repository. It looks for the remote named "origin" and extracts the repository name from the remote's URL. It returns the repository name as a string and an error if the remote is not found or the repository name cannot be extracted.
func (*Bumper) IsOwnCommit ¶
IsOwnCommit checks if the latest commit in the Git repository was made by the bumper.