Documentation ¶
Index ¶
- func NewGithub(scmCfg *api.SCMConfig) (scm.SCMProvider, error)
- type Github
- func (g *Github) CheckToken() bool
- func (g *Github) CreateStatus(recordStatus api.Status, targetURL, repoURL, commitSHA string) error
- func (g *Github) CreateWebHook(repoURL string, webHook *scm.WebHook) error
- func (g *Github) DeleteWebHook(repoURL string, webHookUrl string) error
- func (g *Github) GetTemplateType(repo string) (string, error)
- func (g *Github) GetToken() (string, error)
- func (g *Github) ListBranches(repo string) ([]string, error)
- func (g *Github) ListRepos() ([]api.Repository, error)
- func (g *Github) ListTags(repo string) ([]string, error)
- func (g *Github) NewTagFromLatest(tagName, description, commitID, url string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Github ¶
type Github struct {
// contains filtered or unexported fields
}
Github represents the SCM provider of Github.
func (*Github) CheckToken ¶
CheckToken checks whether the token has the authority of repo by trying ListRepos with the token
func (*Github) CreateStatus ¶
CreateStatus generate a new status for repository.
func (*Github) CreateWebHook ¶
CreateWebHook creates webhook for specified repo.
func (*Github) DeleteWebHook ¶
DeleteWebHook deletes webhook from specified repo.
func (*Github) ListBranches ¶
ListBranches lists the branches for specified repo.
func (*Github) ListRepos ¶
func (g *Github) ListRepos() ([]api.Repository, error)
ListRepos lists the repos by the SCM config.
func (*Github) NewTagFromLatest ¶
NewTagFromLatest generate a new tag.
Click to show internal directories.
Click to hide internal directories.