Documentation ¶
Index ¶
- type HookForm
- type SCM
- func (s SCM) Client() *scm.Client
- func (s SCM) CreateHook(repo, target, secret, provider string, data HookForm) (*scm.Hook, error)
- func (s SCM) CreateStatus(repo, sha, url string, state scm.State) error
- func (s SCM) DeleteHook(repo string, ID string) error
- func (s SCM) FindBranch(repo, name string) (*scm.Reference, error)
- func (s SCM) FindCommit(repo, ref string) (*scm.Commit, error)
- func (s SCM) FindContent(repo, ref, path string) (*scm.Content, error)
- func (s SCM) FindRepo(name string) (*scm.Repository, error)
- func (s SCM) FindTag(repo, name string) (*scm.Reference, error)
- func (s SCM) LastCommit(repo, branch string) (*scm.Commit, error)
- func (s SCM) ListCommits(repo, branch string) ([]*scm.Commit, error)
- func (s SCM) ListContent(repo, ref, path string) ([]*scm.Content, error)
- func (s SCM) ListHooks(repo string) ([]*scm.Hook, error)
- func (s SCM) ListRepos(page, size int) ([]*scm.Repository, error)
- func (s SCM) RefType(ref string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HookForm ¶
type HookForm struct { Branch bool `json:"branch" valid:"required"` Push bool `json:"push" valid:"required"` PullRequest bool `json:"pullRequest" valid:"required"` Tag bool `json:"tag" valid:"required"` }
HookForm struct for saving webhooks.
type SCM ¶
type SCM struct {
// contains filtered or unexported fields
}
SCM represents source code management instance.
func (SCM) CreateHook ¶
CreateHook creates hook for specified repository.
func (SCM) CreateStatus ¶
CreateStatus sends build status to SCM provider.
func (SCM) DeleteHook ¶
DeleteHook deletes webhook by ID.
func (SCM) FindBranch ¶
FindBranch finds a git branch by name.
func (SCM) FindCommit ¶
FindCommit finds commit.
func (SCM) FindContent ¶
FindContent finds content of a repository file.
func (SCM) FindRepo ¶
func (s SCM) FindRepo(name string) (*scm.Repository, error)
FindRepo finds repository.
func (SCM) LastCommit ¶
LastCommit returns last commit.
func (SCM) ListCommits ¶
ListCommits returns list of commits.
func (SCM) ListContent ¶
ListContent returns a list of contents in a repo directory by path.
Click to show internal directories.
Click to hide internal directories.