Documentation
¶
Index ¶
- type Client
- func (c *Client) GetComment(ctx context.Context, commentID uint) (Comment, error)
- func (c *Client) GetComments(ctx context.Context) ([]Comment, error)
- func (c *Client) PutComment(ctx context.Context, body string, prNumber int) (Comment, error)
- func (c *Client) SelectComments(ctx context.Context, filters ...Filter) ([]Comment, error)
- type Comment
- type Filter
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
}
func (*Client) GetComment ¶
func (*Client) PutComment ¶
type Comment ¶
type Comment struct {
// ID refers to the database ID for a particular GitHub comment.
ID uint
// Body holds the contents of the comment.
Body string
// Labels is a map of label names where the key is the name and the value is empty. It serves the purpose
// for fast querying if a comment contains a particular label.
Labels map[string]struct{}
// PullRequestNumber is the reference to the pull request where this comment was made.
PullRequestNumber uint
}
Comment contains a representation of GitHub comment.
type Filter ¶
func FilterCommentRegex ¶
FilterCommentRegex returns comments that match a given regex.
func FilterLabels ¶
FilterLabels returns comment that match at least one of the given labels.
func FilterLatestPerPR ¶
func FilterLatestPerPR() Filter
FilterLatestPerPR returns the latest comment per PR that matches previous criteria if any.
func FilterSince ¶
FilterSince returns comments newer than the one given.
Click to show internal directories.
Click to hide internal directories.