Documentation ¶
Overview ¶
Copyright (C) 2017 The BlameWarrior Authors. This file is a part of BlameWarrior service. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrRateLimitReached = errors.New("GitHub API request rate limit reached") ErrNoSuchRepository = errors.New("no such repository") )
Functions ¶
func SplitRepositoryName ¶
SplitRepositoryName splits full GitHub repository name into owner and name parts.
Types ¶
type Collaborator ¶
type GithubMemberHook ¶
type GithubMemberHook struct { Action string `json:"action"` Member Collaborator `json:"member"` Repository struct { FullName string `json:"full_name"` } `json:"repository"` }
type GithubPullRequestHook ¶
type GithubPullRequestHook struct { PullRequest gh.PullRequest `json:"pull_request"` Repository struct { FullName string `json:"full_name"` } `json:"repository"` RequestedReviewers []Collaborator `json:"requested_reviewers"` ReviewComments []ReviewComment `json:"review_comments"` }
type GithubRepositories ¶
type GithubRepositories struct {
// contains filtered or unexported fields
}
func NewGithubRepositories ¶
func NewGithubRepositories(tokenClient tokens.Client) *GithubRepositories
NewClient returns a new copy of github repositories service that uses given http.Client to make GitHub API requests.
type GithubReviewers ¶
type GithubReviewers struct {
// contains filtered or unexported fields
}
func NewGithubReviewers ¶
func NewGithubReviewers(tokenClient tokens.Client) *GithubReviewers
func (*GithubReviewers) RequestReviewers ¶
func (service *GithubReviewers) RequestReviewers(ctx Context, repoFullName string, pullNumber int, reviewers []Collaborator) (err error)
func (*GithubReviewers) ReviewComments ¶
func (service *GithubReviewers) ReviewComments(ctx Context, repoFullName string, pullNumber int) ([]ReviewComment, error)
type Repositories ¶
type ReviewComment ¶
type ReviewComment gh.PullRequestComment