github

package
v0.7.0-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGithub

func NewGithub(scmCfg *api.SCMConfig) (scm.SCMProvider, error)

NewGithub new Github client.

Types

type Github

type Github struct {
	// contains filtered or unexported fields
}

Github represents the SCM provider of Github.

func (*Github) CheckToken

func (g *Github) CheckToken() bool

CheckToken checks whether the token has the authority of repo by trying ListRepos with the token

func (*Github) CreateStatus

func (g *Github) CreateStatus(recordStatus api.Status, targetURL, repoURL, commitSHA string) error

CreateStatus generate a new status for repository.

func (*Github) CreateWebHook

func (g *Github) CreateWebHook(repoURL string, webHook *scm.WebHook) error

CreateWebHook creates webhook for specified repo.

func (*Github) DeleteWebHook

func (g *Github) DeleteWebHook(repoURL string, webHookUrl string) error

DeleteWebHook deletes webhook from specified repo.

func (*Github) GetTemplateType

func (g *Github) GetTemplateType(repo string) (string, error)

func (*Github) GetToken

func (g *Github) GetToken() (string, error)

GetToken gets the token by the username and password of SCM config.

func (*Github) ListBranches

func (g *Github) ListBranches(repo string) ([]string, error)

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) ListTags

func (g *Github) ListTags(repo string) ([]string, error)

ListTags lists the tags for specified repo.

func (*Github) NewTagFromLatest

func (g *Github) NewTagFromLatest(tagName, description, commitID, url string) error

NewTagFromLatest generate a new tag.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL