Help us shape the future of Go! Take the 2026 Go Developer Survey

prcomment

package
v0.7.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2026 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PRCommenter

type PRCommenter interface {
	// PostComment posts body as a COMMENT review on the PR identified by
	// frontmatter (pr_url, or repository + pull_request_number). Returns an
	// error when the PR cannot be resolved, the token is missing, or the
	// GitHub API call fails. The error carries a frozen substring so callers
	// log the right WARNING.
	PostComment(ctx context.Context, frontmatter lib.TaskFrontmatter, body string) error
}

PRCommenter posts a plain COMMENT review on a GitHub pull request. It never approves or requests changes — the controller never gates the PR merge. PostComment is best-effort: it returns an error only for genuine send failures; callers swallow the error and log at WARNING (the frontmatter escalation must not be blocked by a failed comment).

func NewPRCommenter

func NewPRCommenter(httpClient *http.Client, baseURL, token string) PRCommenter

NewPRCommenter constructs a PRCommenter. token may be empty — in that case PostComment returns an error with the missing-token substring and posts nothing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL