Documentation
¶
Index ¶
- Variables
- type Client
- type Issue
- type IssueOptions
- type IssueService
- type IssueServiceImpl
- func (s *IssueServiceImpl) CreateComment(ctx context.Context, owner, repo string, number int, ...) (*github.IssueComment, *github.Response, error)
- func (s *IssueServiceImpl) EditComment(ctx context.Context, owner, repo string, commentID int64, ...) (*github.IssueComment, *github.Response, error)
- func (s *IssueServiceImpl) ListComments(ctx context.Context, owner, repo string, number int, ...) ([]*github.IssueComment, *github.Response, error)
Constants ¶
This section is empty.
Variables ¶
var ErrCommentNotFound = errors.New("comment not found")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Issue *Issue
// contains filtered or unexported fields
}
type Issue ¶
type Issue struct {
Opt IssueOptions
// contains filtered or unexported fields
}
func (*Issue) AddComment ¶
AddComment adds a new comment or updates an existing comment on a GitHub issue. If the Update field is true, it will append a unique identifier to the comment body and attempt to find and update the existing comment with that identifier. Otherwise, it will create a new comment on the issue.
func (*Issue) FindComment ¶
FindComment returns the GitHub issue comment that contains the specified key, or nil if no such comment exists. It retrieves all comments on the issue and searches for one that contains the specified key in the comment body.
type IssueOptions ¶
type IssueService ¶
type IssueService interface {
CreateComment(ctx context.Context, owner, repo string, number int, comment *github.IssueComment) (*github.IssueComment, *github.Response, error)
EditComment(ctx context.Context, owner, repo string, commentID int64, comment *github.IssueComment) (*github.IssueComment, *github.Response, error)
ListComments(ctx context.Context, owner, repo string, number int, opts *github.IssueListCommentsOptions) ([]*github.IssueComment, *github.Response, error)
}
APIClient is an interface that wraps the GitHub API client.
type IssueServiceImpl ¶
type IssueServiceImpl struct {
// contains filtered or unexported fields
}
func (*IssueServiceImpl) CreateComment ¶
func (s *IssueServiceImpl) CreateComment(ctx context.Context, owner, repo string, number int, comment *github.IssueComment) (*github.IssueComment, *github.Response, error)
CreateComment wraps the CreateComment method of the github.IssuesService.
func (*IssueServiceImpl) EditComment ¶
func (s *IssueServiceImpl) EditComment(ctx context.Context, owner, repo string, commentID int64, comment *github.IssueComment) (*github.IssueComment, *github.Response, error)
EditComment wraps the EditComment method of the github.IssuesService.
func (*IssueServiceImpl) ListComments ¶
func (s *IssueServiceImpl) ListComments(ctx context.Context, owner, repo string, number int, opts *github.IssueListCommentsOptions) ([]*github.IssueComment, *github.Response, error)
ListComments wraps the ListComments method of the github.IssuesService.