prcomment

package
v0.38.2 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: BSD-2-Clause Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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