Documentation ¶
Index ¶
- type Client
- func (c *Client) AddCommentToIssue(num int, comment *github.IssueComment) error
- func (c *Client) AddCommentToPR(num int, comment *github.IssueComment) error
- func (c *Client) AddLabelsToIssue(num int, labels []string) error
- func (c *Client) AssignIssueToUsers(num int, users []string) error
- func (c *Client) CreateIssue(title, body string) error
- func (c *Client) CreatePR(newPR *github.NewPullRequest) (*github.PullRequest, error)
- func (c *Client) EditIssue(number int, issue *github.IssueRequest) error
- func (c *Client) GetAllLabels() ([]*github.Label, error)
- func (c *Client) GetIssues(opt *github.IssueListByRepoOptions) ([]*github.Issue, error)
- func (c *Client) GetLabelsInIssue(num int) ([]*github.Label, error)
- func (c *Client) GetPullRequests(opt *github.PullRequestListOptions) ([]*github.PullRequest, error)
- func (c *Client) GetRepository() (*github.Repository, error)
- func (c *Client) GetSinglePR(num int) (*github.PullRequest, error)
- func (c *Client) GetStrLabelsInIssue(num int) ([]string, error)
- func (c *Client) IssueContainsLabels(num int, labels []string) bool
- func (c *Client) IssueHasComment(num int, element string) (int, bool)
- func (c *Client) IssueHasLabel(num int, inputLabel string) bool
- func (c *Client) ListComments(num int) ([]*github.IssueComment, error)
- func (c *Client) ListCommits(num int) ([]*github.RepositoryCommit, error)
- func (c *Client) ListContributors(opt *github.ListContributorsOptions) ([]*github.Contributor, error)
- func (c *Client) ListPRComments(num int) ([]*github.PullRequestComment, error)
- func (c *Client) ListPRReviews(num int) ([]*github.PullRequestReview, error)
- func (c *Client) Owner() string
- func (c *Client) RemoveComment(id int) error
- func (c *Client) RemoveLabelForIssue(num int, label string) error
- func (c *Client) ReplaceLabelsForIssue(num int, labels []string) error
- func (c *Client) Repo() string
- func (c *Client) RmCommentsViaStr(num int, str string) error
- func (c *Client) RmCommentsViaStrAndAttach(num int, str string, body string) error
- func (c *Client) SearchIssues(query string, opt *github.SearchOptions, all bool) (*github.IssuesSearchResult, error)
- func (c *Client) UnassignIssueToUsers(num int, users []string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client refers to a client which wishes to connect to specific repository of a user.
func (*Client) AddCommentToIssue ¶
func (c *Client) AddCommentToIssue(num int, comment *github.IssueComment) error
AddCommentToIssue adds comment to an issue.
func (*Client) AddCommentToPR ¶
func (c *Client) AddCommentToPR(num int, comment *github.IssueComment) error
AddCommentToPR adds comment to a pull request.
func (*Client) AddLabelsToIssue ¶
AddLabelsToIssue adds labels to an issue
func (*Client) AssignIssueToUsers ¶
AssignIssueToUsers assigns users to the specified issue.
func (*Client) CreateIssue ¶
CreateIssue creates a brand new issue in repo's issue list.
func (*Client) CreatePR ¶
func (c *Client) CreatePR(newPR *github.NewPullRequest) (*github.PullRequest, error)
CreatePR creates a brand new pull request in repo.
func (*Client) EditIssue ¶
func (c *Client) EditIssue(number int, issue *github.IssueRequest) error
EditIssue edit a specific issue
func (*Client) GetAllLabels ¶
GetAllLabels gets all labels of a repo, not an issue, nor a pull request
func (*Client) GetLabelsInIssue ¶
GetLabelsInIssue gets labels attached on a single issue whose id is num.
func (*Client) GetPullRequests ¶
func (c *Client) GetPullRequests(opt *github.PullRequestListOptions) ([]*github.PullRequest, error)
GetPullRequests gets pull request list for a repo.
func (*Client) GetRepository ¶
func (c *Client) GetRepository() (*github.Repository, error)
GetRepository gets a repository.
func (*Client) GetSinglePR ¶
func (c *Client) GetSinglePR(num int) (*github.PullRequest, error)
GetSinglePR gets a single PR from repo.
func (*Client) GetStrLabelsInIssue ¶
GetStrLabelsInIssue gets string labels attached on a single issue whose id is num.
func (*Client) IssueContainsLabels ¶
IssueContainsLabels return whether issue contains labels
func (*Client) IssueHasComment ¶
IssueHasComment returns true if the issue contains a commnet who has substring of 'elment'
func (*Client) IssueHasLabel ¶
IssueHasLabel judges if an issue has a specified label.
func (*Client) ListComments ¶
func (c *Client) ListComments(num int) ([]*github.IssueComment, error)
ListComments lists all comments in an issue including pull request.
func (*Client) ListCommits ¶
func (c *Client) ListCommits(num int) ([]*github.RepositoryCommit, error)
ListCommits lists all commits in a pull request.
func (*Client) ListContributors ¶
func (c *Client) ListContributors(opt *github.ListContributorsOptions) ([]*github.Contributor, error)
ListContributors lists all contributors of a repository.
func (*Client) ListPRComments ¶
func (c *Client) ListPRComments(num int) ([]*github.PullRequestComment, error)
ListPRComments lists comments for a pull request.
func (*Client) ListPRReviews ¶
func (c *Client) ListPRReviews(num int) ([]*github.PullRequestReview, error)
ListPRReviews lists all reviews on a pull request.
func (*Client) RemoveComment ¶
RemoveComment removes a comment for an issue.
func (*Client) RemoveLabelForIssue ¶
RemoveLabelForIssue removes a label from an issue.
func (*Client) ReplaceLabelsForIssue ¶
ReplaceLabelsForIssue replaces all labels for an issue.
func (*Client) RmCommentsViaStr ¶
RmCommentsViaStr removes a comment in an issue via given string
func (*Client) RmCommentsViaStrAndAttach ¶
RmCommentsViaStrAndAttach removes all comments contains the string str and attaches a brand new commnet constructed by body. In this robot, many cases needs this actions to fresh the comments.
func (*Client) SearchIssues ¶
func (c *Client) SearchIssues(query string, opt *github.SearchOptions, all bool) (*github.IssuesSearchResult, error)
SearchIssues searches issues. search result's wrapper is never be nil.