Documentation ¶
Overview ¶
Package github provides a simple client for the GitHub API
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGitHubRequest ¶
Returns a request set up for the GitHub API
func WasMentioned ¶
Check to see if logged in user was mentioned in comment
Types ¶
type Error ¶
type Error struct { Message string `json:"message"` InvalidResources []InvalidResource }
type Event ¶
type Event struct { Action string `json:"action"` Issue Issue `json:"issue"` PullRequest Issue `json:"pull_request"` Comment Comment `json:"comment"` Repository Repository `json:"repository"` }
type GitRef ¶
type GitRef struct { Ref string `json:"ref"` Sha string `json:"sha"` Repository Repository `json:"repo"` }
type InvalidResource ¶
type PullRequest ¶
type PullRequest struct { Body string `json:"body"` State string `json:"state"` Title string `json:"title"` Number int `json:"number"` Head GitRef `json:"head"` Base GitRef `json:"base"` }
func (PullRequest) PostComment ¶
func (pr PullRequest) PostComment(msg string) (Comment, error)
PostComment posts a new comment on pull request via GitHub API
type Repository ¶
type Repository struct { FullName string `json:"full_name"` Name string `json:"name"` GitUrl string `json:"git_url"` SshUrl string `json:"ssh_url"` Owner User `json:"owner"` }
func (Repository) FindPR ¶
func (r Repository) FindPR(number int) (*PullRequest, error)
Click to show internal directories.
Click to hide internal directories.