Documentation ¶
Index ¶
- func GitHubURL(repoOwner, repoName string) string
- type Git
- type Options
- type RepoOptions
- type Repository
- func (repo *Repository) AddRemote(name, url string) error
- func (repo *Repository) Checkout(refName string) error
- func (repo *Repository) CherryPickCommits(commits []string, targetBranch string) error
- func (repo *Repository) CherryPickMergeCommit(branch, commitSHA string, parent int) error
- func (repo *Repository) CreateBranch(branchName string) error
- func (repo *Repository) HasMergeConflicts() (hasConflicts bool, files []string, err error)
- func (repo *Repository) MainRemoteURL() (string, error)
- func (repo *Repository) Options() *RepoOptions
- func (repo *Repository) PushBranch(branch, remote string) error
- func (repo *Repository) SetClient(c *gogit.Repository)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Git ¶
type Git struct {
// contains filtered or unexported fields
}
func NewWithOptions ¶
NewWithOptions returns a git object with specific options
func (*Git) OpenOrCloneRepo ¶
func (g *Git) OpenOrCloneRepo(url, path string) (repo *Repository, err error)
OpenOrCloneRepo
type RepoOptions ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository() *Repository
func NewRepositoryWithOptions ¶
func NewRepositoryWithOptions(opts *RepoOptions) *Repository
func (*Repository) AddRemote ¶
func (repo *Repository) AddRemote(name, url string) error
func (*Repository) Checkout ¶
func (repo *Repository) Checkout(refName string) error
Checkout checks out the reference named `refName` in the repository. Currently works with branches only
func (*Repository) CherryPickCommits ¶
func (repo *Repository) CherryPickCommits(commits []string, targetBranch string) error
CherryPickCommits cherry picks the commits in `commits` to a target branch
func (*Repository) CherryPickMergeCommit ¶
func (repo *Repository) CherryPickMergeCommit(branch, commitSHA string, parent int) error
func (*Repository) CreateBranch ¶
func (repo *Repository) CreateBranch(branchName string) error
func (*Repository) HasMergeConflicts ¶
func (repo *Repository) HasMergeConflicts() (hasConflicts bool, files []string, err error)
HasMergeConflicts returns a bool indicating if a merge conflict is on
func (*Repository) MainRemoteURL ¶
func (repo *Repository) MainRemoteURL() (string, error)
func (*Repository) Options ¶
func (repo *Repository) Options() *RepoOptions
func (*Repository) PushBranch ¶
func (repo *Repository) PushBranch(branch, remote string) error
func (*Repository) SetClient ¶
func (repo *Repository) SetClient(c *gogit.Repository)
Click to show internal directories.
Click to hide internal directories.