Documentation ¶
Index ¶
- type GitHandler
- type GoGit
- func (g GoGit) Add(files []string, workingDir string) error
- func (g GoGit) Checkout(username, password, branch, remoteBranch, workingDir string) error
- func (g GoGit) Clone(username, password, URL, workingDir string) error
- func (g GoGit) Commit(user, email, message, workingDir string, signingKey string, passprase string) error
- func (g GoGit) GetChangedFiles(workingDir string) ([]string, error)
- func (g GoGit) IsSimilarBranch(a, b, workingDir string) (bool, error)
- func (g GoGit) NewTag(tag, message, workingDir string) (bool, error)
- func (g GoGit) Push(username string, password string, workingDir string, force bool) error
- func (g GoGit) PushTag(tag string, username string, password string, workingDir string, force bool) error
- func (g GoGit) RemoteURLs(workingDir string) (map[string]string, error)
- func (g GoGit) SanitizeBranchName(branch string) string
- func (g GoGit) Tags(workingDir string) (tags []string, err error)
- type MockGit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitHandler ¶ added in v0.28.0
type GitHandler interface { Add(files []string, workingDir string) error Checkout(username, password, branch, remoteBranch, workingDir string) error Clone(username, password, URL, workingDir string) error Commit(user, email, message, workingDir string, signingKey string, passprase string) error GetChangedFiles(workingDir string) ([]string, error) IsSimilarBranch(a, b, workingDir string) (bool, error) NewTag(tag, message, workingDir string) (bool, error) Push(username string, password string, workingDir string, force bool) error PushTag(tag string, username string, password string, workingDir string, force bool) error RemoteURLs(workingDir string) (map[string]string, error) SanitizeBranchName(branch string) string Tags(workingDir string) (tags []string, err error) }
type GoGit ¶ added in v0.28.0
type GoGit struct { }
func (GoGit) Commit ¶ added in v0.28.0
func (g GoGit) Commit(user, email, message, workingDir string, signingKey string, passprase string) error
Commit run `git commit`.
func (GoGit) GetChangedFiles ¶ added in v0.28.0
func (GoGit) IsSimilarBranch ¶ added in v0.28.0
IsSimilarBranch checks that the last commits of the two branches are similar then return true if it's the case
func (GoGit) NewTag ¶ added in v0.28.0
NewTag create a tag then return a boolean to indicate if the tag was created or not.
func (GoGit) PushTag ¶ added in v0.28.0
func (g GoGit) PushTag(tag string, username string, password string, workingDir string, force bool) error
PushTag publish a single tag created locally
func (GoGit) RemoteURLs ¶ added in v0.28.0
RemoteURLs returns the list of remote URLs
func (GoGit) SanitizeBranchName ¶ added in v0.28.0
SanitizeBranchName replace wrong character in the branch name
Click to show internal directories.
Click to hide internal directories.