Documentation ¶
Index ¶
- func CreateHook(client *github.Client, owner, name, url string) (*github.Hook, error)
- func DeleteHook(client *github.Client, owner, name, url string) error
- func GetFile(client *github.Client, owner, name, path, ref string) ([]byte, error)
- func GetHook(client *github.Client, owner, name, rawurl string) (*github.Hook, error)
- func GetUserRepos(client *github.Client) ([]github.Repository, error)
- type Branch
- type Client
- type Error
- type Github
- func (g *Github) DelHook(user *model.User, repo *model.Repo, link string) error
- func (g *Github) GetComments(u *model.User, r *model.Repo, num int) ([]*model.Comment, error)
- func (g *Github) GetCommentsSinceHead(u *model.User, r *model.Repo, num int) ([]*model.Comment, error)
- func (g *Github) GetContents(u *model.User, r *model.Repo, path string) ([]byte, error)
- func (g *Github) GetHook(r *http.Request) (*model.Hook, error)
- func (g *Github) GetMembers(user *model.User, team string) ([]*model.Member, error)
- func (g *Github) GetPRHook(r *http.Request) (*model.PRHook, error)
- func (g *Github) GetPerm(user *model.User, owner, name string) (*model.Perm, error)
- func (g *Github) GetPullRequestsForCommit(u *model.User, r *model.Repo, sha *string) ([]model.PullRequest, error)
- func (g *Github) GetRepo(user *model.User, owner, name string) (*model.Repo, error)
- func (g *Github) GetRepos(u *model.User) ([]*model.Repo, error)
- func (g *Github) GetStatusHook(r *http.Request) (*model.StatusHook, error)
- func (g *Github) GetTeams(user *model.User) ([]*model.Team, error)
- func (g *Github) GetUser(res http.ResponseWriter, req *http.Request) (*model.User, error)
- func (g *Github) GetUserToken(token string) (string, error)
- func (g *Github) ListTags(u *model.User, r *model.Repo) ([]model.Tag, error)
- func (g *Github) MergePR(u *model.User, r *model.Repo, pullRequest model.PullRequest, ...) (*string, error)
- func (g *Github) ScheduleDeployment(u *model.User, r *model.Repo, d model.DeploymentInfo) error
- func (g *Github) SetHook(user *model.User, repo *model.Repo, link string) error
- func (g *Github) SetStatus(u *model.User, r *model.Repo, num int, ok bool) error
- func (g *Github) Tag(u *model.User, r *model.Repo, version *string, sha *string) error
- func (g *Github) WriteComment(u *model.User, r *model.Repo, num int, message string) error
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateHook ¶
CreateHook is a helper function that creates a post-commit hook for the specified repository.
func GetFile ¶
GetFile is a heper function that retrieves a file from GitHub and returns its contents in byte array format.
func GetHook ¶
GetHook is a heper function that retrieves a hook by hostname. To do this, it will retrieve a list of all hooks and iterate through the list.
func GetUserRepos ¶
func GetUserRepos(client *github.Client) ([]github.Repository, error)
GetUserRepos is a helper function that returns a list of all user repositories. Paginated results are aggregated into a single list.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientToken ¶
NewClientToken returns a client at the specified url that authenticates all outbound requests with the given token.
func (*Client) BranchProtect ¶
type Github ¶
func (*Github) GetComments ¶
func (*Github) GetCommentsSinceHead ¶
func (*Github) GetContents ¶
func (*Github) GetMembers ¶
func (*Github) GetPullRequestsForCommit ¶
func (*Github) GetStatusHook ¶
func (*Github) ScheduleDeployment ¶
Click to show internal directories.
Click to hide internal directories.