{"modulePath":"github.com/nenad/github-pr-comments-resource","version":"v0.0.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package github\n\n## Types\n\n```go\ntype Client struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewClient(ctx context.Context, accessToken, owner, repositoryName string) *Client\n```\n\n```go\nfunc (c *Client) GetComment(ctx context.Context, commentID uint) (Comment, error)\n```\n\n```go\nfunc (c *Client) GetComments(ctx context.Context) ([]Comment, error)\n```\n\n```go\nfunc (c *Client) PutComment(ctx context.Context, body string, prNumber int) (Comment, error)\n```\n\n```go\nfunc (c *Client) SelectComments(ctx context.Context, filters ...Filter) ([]Comment, error)\n```\n\n```go\ntype Comment struct {\n\t// ID refers to the database ID for a particular GitHub comment.\n\tID uint\n\t// Body holds the contents of the comment.\n\tBody string\n\t// Labels is a map of label names where the key is the name and the value is empty. It serves the purpose\n\t// for fast querying if a comment contains a particular label.\n\tLabels map[string]struct{}\n\t// PullRequestNumber is the reference to the pull request where this comment was made.\n\tPullRequestNumber uint\n}\n```\nComment contains a representation of GitHub comment.\n\n```go\nfunc (c *Comment) HasLabel(label string) bool\n```\nHasLabel checks if the PR where the comment was posted contains a given label.\n\n```go\ntype Filter func([]Comment) []Comment\n```\n\n```go\nfunc FilterCommentRegex(regex string) Filter\n```\nFilterCommentRegex returns comments that match a given regex.\n\n```go\nfunc FilterLabels(labels []string) Filter\n```\nFilterLabels returns comment that match at least one of the given labels.\n\n```go\nfunc FilterLatestPerPR() Filter\n```\nFilterLatestPerPR returns the latest comment per PR that matches previous criteria if any.\n\n```go\nfunc FilterSince(commentID uint) Filter\n```\nFilterSince returns comments newer than the one given.\n\n","path":"github.com/nenad/github-pr-comments-resource/github","name":"github","synopsis":"","isRedistributable":true}
