Documentation
¶
Index ¶
- type Client
- func (c *Client) GetInstallationClient(ctx context.Context, installationID int64) (*github.Client, error)
- func (c *Client) PostComment(ctx context.Context, installationID int64, issueComment *IssueComment, ...) error
- func (c *Client) ReactWithThumbsUp(ctx context.Context, installationID int64, issueComment *IssueComment) error
- func (c *Client) UpdateIssueDescription(ctx context.Context, installationID int64, issueComment *IssueComment, ...) error
- type Comment
- type Installation
- type Issue
- type IssueComment
- type Reactions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) GetInstallationClient ¶
func (c *Client) GetInstallationClient(ctx context.Context, installationID int64) (*github.Client, error)
GetInstallationClient returns a client authenticated for a specific installation.
func (*Client) PostComment ¶
func (c *Client) PostComment(ctx context.Context, installationID int64, issueComment *IssueComment, body string) error
PostComment sends a comment to an issue.
func (*Client) ReactWithThumbsUp ¶
func (c *Client) ReactWithThumbsUp(ctx context.Context, installationID int64, issueComment *IssueComment) error
ReactWithThumbsUp sends a :+1: reaction to the given IssueComment.
func (*Client) UpdateIssueDescription ¶
func (c *Client) UpdateIssueDescription(ctx context.Context, installationID int64, issueComment *IssueComment, body string) error
UpdateIssueDescription updates the issue description.
type Comment ¶
type Comment struct {
Body string `json:"body"`
NodeID string `json:"node_id"`
ID uint64 `json:"id"`
Reactions `json:"reactions"`
}
Comment holds the comment from the IssueComment.
type Installation ¶
type Installation struct {
ID int64 `json:"id"`
}
Installation holds the GitHub App installation info.
type Issue ¶
type Issue struct {
CommentsURL string `json:"comments_url"`
Body string `json:"body"`
State string `json:"state"`
URL string `json:"url"`
HTMLURL string `json:"html_url"`
Title string `json:"title"`
}
Issue holds the issue from the issue comment.
type IssueComment ¶
type IssueComment struct {
Action string `json:"action"`
Issue `json:"issue"`
Comment `json:"comment"`
Installation Installation `json:"installation"`
}
IssueComment holds the comment received.
func (IssueComment) ToJSON ¶
func (ic IssueComment) ToJSON() ([]byte, error)
Converts the IssueComment into a JSON.
Click to show internal directories.
Click to hide internal directories.