Documentation
¶
Index ¶
- Constants
- func CreatePRComment(ctx context.Context, ghRepo string, prNumber int, body string, env []string) error
- func FindExistingComment(ctx context.Context, ghRepo string, prNumber int, env []string) (int64, error)
- func UpsertPRComment(ctx context.Context, ghRepo string, prNumber int, body string, env []string) error
Constants ¶
const CommentMarker = "<!-- roborev-pr-comment -->"
CommentMarker is an invisible HTML marker embedded in every roborev PR comment so subsequent runs can find and update the existing comment instead of creating duplicates.
Variables ¶
This section is empty.
Functions ¶
func CreatePRComment ¶
func CreatePRComment(ctx context.Context, ghRepo string, prNumber int, body string, env []string) error
CreatePRComment posts a new roborev PR comment. It prepends the CommentMarker and truncates to review.MaxCommentLen, then always creates a new comment (no find/patch).
func FindExistingComment ¶
func FindExistingComment(ctx context.Context, ghRepo string, prNumber int, env []string) (int64, error)
FindExistingComment searches for an existing roborev comment on the given PR. It returns the comment ID if found, or 0 if no match exists. env, when non-nil, is set on the subprocess (e.g. for GitHub App tokens).
func UpsertPRComment ¶
func UpsertPRComment(ctx context.Context, ghRepo string, prNumber int, body string, env []string) error
UpsertPRComment creates or updates a roborev PR comment. It prepends the CommentMarker, truncates to review.MaxCommentLen, and either patches an existing comment or creates a new one.
Types ¶
This section is empty.