Versions in this module Expand all Collapse all v1 v1.0.0 Dec 31, 2017 Changes in this version + func CreateHook(c context.Context, client *github.Client, owner, name, url string) (*github.Hook, error) + func DeleteHook(c context.Context, client *github.Client, owner, name, url string) error + func GetFile(c context.Context, client *github.Client, owner, name, path, ref string) ([]byte, error) + func GetHook(c context.Context, client *github.Client, owner, name, rawurl string) (*github.Hook, error) + func GetUserRepos(c context.Context, client *github.Client) ([]*github.Repository, error) + type Branch struct + EnforceAdmins bool + RequiredPullRequestReviews *RequiredPullRequestReviews + RequiredStatusChecks *RequiredStatusChecks + Restrictions *Restrictions + type Client struct + func NewClient(uri string) *Client + func NewClientToken(uri, token string) *Client + func (c *Client) GetBranchStatusCheck(owner, name, branch string) (*RequiredStatusChecks, error) + func (c *Client) PatchBranchStatusCheck(owner, name, branch string, in *RequiredStatusChecks) error + func (c *Client) SetClient(client *http.Client) + func (c *Client) UpdateBranch(owner, name, branch string, in *Branch) error + type DismissalRestrictions struct + Teams []string + Users []string + type Error struct + Message string + func (e Error) Error() string + func (e Error) String() string + type Github struct + API string + Client string + Scopes []string + Secret string + URL string + func (g *Github) AddIssueLabels(c context.Context, user *model.User, repo *model.Repo, number int, ...) error + func (g *Github) DelHook(c context.Context, user *model.User, repo *model.Repo, link string) error + func (g *Github) GetComments(c context.Context, u *model.User, r *model.Repo, num int) ([]*model.Comment, error) + func (g *Github) GetContents(c context.Context, u *model.User, r *model.Repo, path string) ([]byte, error) + func (g *Github) GetHook(c context.Context, r *http.Request) (*model.Hook, error) + func (g *Github) GetIssueLabels(c context.Context, user *model.User, repo *model.Repo, number int) ([]string, error) + func (g *Github) GetMembers(c context.Context, user *model.User, team string) ([]*model.Member, error) + func (g *Github) GetPerm(c context.Context, user *model.User, owner, name string) (*model.Perm, error) + func (g *Github) GetRepo(c context.Context, user *model.User, owner, name string) (*model.Repo, error) + func (g *Github) GetRepos(c context.Context, u *model.User) ([]*model.Repo, error) + func (g *Github) GetReviews(c context.Context, u *model.User, r *model.Repo, num int) ([]*model.Review, error) + func (g *Github) GetTeams(c context.Context, user *model.User) ([]*model.Team, error) + func (g *Github) GetUser(c context.Context, res http.ResponseWriter, req *http.Request) (*model.User, error) + func (g *Github) GetUserToken(c context.Context, token string) (string, error) + func (g *Github) RemoveIssueLabels(c context.Context, user *model.User, repo *model.Repo, number int, ...) error + func (g *Github) SetHook(c context.Context, user *model.User, repo *model.Repo, link string) error + func (g *Github) SetStatus(c context.Context, u *model.User, r *model.Repo, num, granted, required int) error + type RequiredPullRequestReviews struct + DismissStaleReviews bool + DismissalRestrictions DismissalRestrictions + RequireCodeOwnerReviews bool + type RequiredStatusChecks struct + Contexts []string + ContextsURL string + Strict bool + URL string + type Restrictions struct + Teams []string + Users []string