Documentation
¶
Overview ¶
Package comment upserts a single sticky PR comment identified by a marker.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Commenter ¶
type Commenter interface {
List(ctx context.Context) ([]Comment, error)
Create(ctx context.Context, body string) (Comment, error)
Update(ctx context.Context, id int64, body string) (Comment, error)
}
Commenter is the seam over the GitHub issue-comments API, so the sticky logic is testable without network access.
type GitHubCommenter ¶
type GitHubCommenter struct {
// contains filtered or unexported fields
}
GitHubCommenter implements Commenter against a real repository PR using the GitHub issue-comments API (PRs are issues for commenting purposes).
func NewGitHubCommenter ¶
func NewGitHubCommenter(ctx context.Context, hc *http.Client, token, owner, repo string, number int) *GitHubCommenter
NewGitHubCommenter builds a Commenter for owner/repo#number authenticated with token (typically the Actions GITHUB_TOKEN).