Documentation ¶
Index ¶
- type GitHub
- func (g GitHub) CheckExecdriver(pr *PullRequest) error
- func (g GitHub) Client() *octokat.Client
- func (g GitHub) DcoVerified(pr *PullRequest) (bool, error)
- func (g *GitHub) GetContent(repo octokat.Repo, id int, isPR bool) (*PullRequestContent, error)
- func (g GitHub) IsMergeable(pr *PullRequest) (mergeable bool, err error)
- func (g GitHub) IssueInfoCheck(issueHook *octokat.IssueHook) error
- func (g GitHub) LabelIssueComment(issueHook *octokat.IssueHook) error
- func (g GitHub) LoadPullRequest(hook *octokat.PullRequestHook) (*PullRequest, error)
- func (g GitHub) MoveTriageForward(repo *octokat.Repository, number int, comment *octokat.Comment) error
- type PullRequest
- type PullRequestContent
- func (p *PullRequestContent) AlreadyCommented(commentType, user string) bool
- func (p *PullRequestContent) CommitsSigned() bool
- func (p *PullRequestContent) Distribution() bool
- func (p *PullRequestContent) FindComment(commentType, user string) *octokat.Comment
- func (p *PullRequestContent) HasDocsChanges() bool
- func (p *PullRequestContent) HasVendoringChanges() bool
- func (p *PullRequestContent) IsNonCodeOnly() bool
- func (p *PullRequestContent) OnlyFreebsd() bool
- func (p *PullRequestContent) OnlyWindows() bool
- type PullRequestReviewCommentHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitHub ¶
GitHub holds the client information for connecting to the GitHub API
func (GitHub) CheckExecdriver ¶
func (g GitHub) CheckExecdriver(pr *PullRequest) error
CheckExecdriver checks if the pull request changes something in execdrivers
func (GitHub) DcoVerified ¶
func (g GitHub) DcoVerified(pr *PullRequest) (bool, error)
DcoVerified checks if the pull request has been properly signed
func (*GitHub) GetContent ¶
GetContent returns the content of the issue/pull request number passed.
func (GitHub) IsMergeable ¶
func (g GitHub) IsMergeable(pr *PullRequest) (mergeable bool, err error)
IsMergeable makes sure the pull request can be merged
func (GitHub) IssueInfoCheck ¶
IssueInfoCheck makes sure an issue has the required information from the user
func (GitHub) LabelIssueComment ¶
LabelIssueComment checks if someone has claimed dibs on this issue
func (GitHub) LoadPullRequest ¶
func (g GitHub) LoadPullRequest(hook *octokat.PullRequestHook) (*PullRequest, error)
LoadPullRequest takes an incoming PullRequestHook and converts it to the PullRequest type
func (GitHub) MoveTriageForward ¶
func (g GitHub) MoveTriageForward(repo *octokat.Repository, number int, comment *octokat.Comment) error
MoveTriageForward adds labels pertaining to the status of the pull request
type PullRequest ¶
type PullRequest struct { Hook *octokat.PullRequestHook Repo octokat.Repo Content *PullRequestContent *octokat.PullRequest }
PullRequest describes a github pull request
func (*PullRequest) Execdriver ¶
func (pr *PullRequest) Execdriver() bool
Execdriver checks if the changes are to execdriver's directories.
func (PullRequest) ReleaseBase ¶
func (pr PullRequest) ReleaseBase() bool
ReleaseBase checks if the pull request is beinng merged into the release branch
type PullRequestContent ¶
type PullRequestContent struct {
// contains filtered or unexported fields
}
PullRequestContent contains the files, commits, and comments for a given pull request
func (*PullRequestContent) AlreadyCommented ¶
func (p *PullRequestContent) AlreadyCommented(commentType, user string) bool
AlreadyCommented checks if the user has already commented.
func (*PullRequestContent) CommitsSigned ¶
func (p *PullRequestContent) CommitsSigned() bool
CommitsSigned checks if the commits are signed.
func (*PullRequestContent) Distribution ¶
func (p *PullRequestContent) Distribution() bool
Distribution checks if the changes are to distribution's directories.
func (*PullRequestContent) FindComment ¶
func (p *PullRequestContent) FindComment(commentType, user string) *octokat.Comment
FindComment finds a specific comment.
func (*PullRequestContent) HasDocsChanges ¶
func (p *PullRequestContent) HasDocsChanges() bool
HasDocsChanges checks for docs changes.
func (*PullRequestContent) HasVendoringChanges ¶
func (p *PullRequestContent) HasVendoringChanges() bool
HasVendoringChanges checks for vendoring changes.
func (*PullRequestContent) IsNonCodeOnly ¶
func (p *PullRequestContent) IsNonCodeOnly() bool
IsNonCodeOnly chacks if only non code files are modified.
func (*PullRequestContent) OnlyFreebsd ¶
func (p *PullRequestContent) OnlyFreebsd() bool
OnlyFreebsd checks if changes are only to freebsd specific files.
func (*PullRequestContent) OnlyWindows ¶
func (p *PullRequestContent) OnlyWindows() bool
OnlyWindows checks if whanges are only to windows specific files.
type PullRequestReviewCommentHook ¶
type PullRequestReviewCommentHook struct { Action string PullRequest *octokat.PullRequest Comment *octokat.Comment Repo *octokat.Repository }
PullRequestReviewCommentHook describes the hook for a pull request comment
func ParsePullRequestReviewCommentHook ¶
func ParsePullRequestReviewCommentHook(body io.Reader) (PullRequestReviewCommentHook, error)
ParsePullRequestReviewCommentHook parses the web hook recieved into a PullRequestReviewCommentHook
func (PullRequestReviewCommentHook) IsOpen ¶
func (pr PullRequestReviewCommentHook) IsOpen() bool
IsOpen returns if the pull request is open