Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultBaseURL is the default GitHub API base URL. DefaultBaseURL = "https://api.github.com/" // DefaultAPIHost is the host portion of the default GitHub API base URL. DefaultAPIHost = "api.github.com" )
Variables ¶
View Source
var ErrCommentNotFound = errors.New("comment not found")
ErrCommentNotFound is returned when no existing comment matches the configured key.
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.IssueCommentRequest) (*github.IssueComment, *github.Response, error)
UpdateComment(ctx context.Context, owner, repo string, commentID int64, comment github.IssueCommentRequest) (*github.IssueComment, *github.Response, error)
ListComments(ctx context.Context, owner, repo string, number int, opts *github.IssueListCommentsOptions) ([]*github.IssueComment, *github.Response, error)
}
IssueService is an interface that wraps the GitHub Issues API client.
Click to show internal directories.
Click to hide internal directories.