Documentation ¶
Index ¶
- func CheckoutHead(dir string, branch string) error
- func CheckoutRef(dir string, ref *plumbing.Reference) error
- func CheckoutRefName(dir string, ref *plumbing.Reference) error
- func CheckoutTag(dir string, tag string) error
- func CleanTagRefName(refName string) string
- func CleanTagReference(tagRef *plumbing.Reference) string
- func FormatRef(ref *plumbing.Reference) string
- func GetCloneDepth(envVar string) int
- func GetHeadCommit(dir string) (ref *plumbing.Reference, err error)
- func GetLastTag(dir string) string
- func GetLastTagRef(dir string) *plumbing.Reference
- func WalkRepo(s string, d fs.DirEntry, err error) error
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckoutHead ¶
func CheckoutTag ¶
func CleanTagRefName ¶
func CleanTagReference ¶
clean the tag ref
func GetCloneDepth ¶ added in v0.1.2
GetCloneDepth reads the provided env var and returns an int to be used as git clone depth. Default is 0.
func GetLastTag ¶
func GetLastTagRef ¶
Types ¶
type Repository ¶
type Repository struct { *git.Repository // contains filtered or unexported fields }
func NewRepository ¶
func NewRepository(repo *git.Repository, auth *githttp.BasicAuth, localDir string) *Repository
func (*Repository) FetchUpstreamBranch ¶
func (gr *Repository) FetchUpstreamBranch(branch string) error
func (*Repository) GetLocalDirectory ¶
func (gr *Repository) GetLocalDirectory() string
func (*Repository) GetMergeBase ¶
func (gr *Repository) GetMergeBase(oldest, newest string) (string, error)
func (*Repository) GetModifiedFileNamesBetweenCommits ¶
func (gr *Repository) GetModifiedFileNamesBetweenCommits(oldest, newest string) ([]string, error)
Click to show internal directories.
Click to hide internal directories.