Documentation ¶
Overview ¶
Package github provides convenience wrappers around the go-github package.
Index ¶
- type Client
- func (c *Client) CreateComment(repo models.Repo, pull models.PullRequest, comment string) error
- func (c *Client) GetModifiedFiles(repo models.Repo, pull models.PullRequest) ([]string, error)
- func (c *Client) GetPullRequest(repo models.Repo, num int) (*github.PullRequest, *github.Response, error)
- func (c *Client) PullIsApproved(repo models.Repo, pull models.PullRequest) (bool, error)
- func (c *Client) UpdateStatus(repo models.Repo, pull models.PullRequest, state string, description string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is used to perform GitHub actions.
func (*Client) CreateComment ¶
CreateComment creates a comment on the pull request.
func (*Client) GetModifiedFiles ¶
GetModifiedFiles returns the names of files that were modified in the pull request. The names include the path to the file from the repo root, ex. parent/child/file.txt.
func (*Client) GetPullRequest ¶
func (c *Client) GetPullRequest(repo models.Repo, num int) (*github.PullRequest, *github.Response, error)
GetPullRequest returns the pull request.
func (*Client) PullIsApproved ¶
PullIsApproved returns true if the pull request was approved.
func (*Client) UpdateStatus ¶
func (c *Client) UpdateStatus(repo models.Repo, pull models.PullRequest, state string, description string, context string) error
UpdateStatus updates the status badge on the pull request. See https://github.com/blog/1227-commit-status-api.
Click to show internal directories.
Click to hide internal directories.