feat(workflow): pr-review submits REQUEST_CHANGES on blocking findings and lists unanchored ones in the review body

This commit is contained in:
sam committed 2026-10-17 17:17:48 +11:00
1 parent 6f4c03896a
commit 86b3cb4fa9
9 files changed
+87 -42

No files matched your search

+10 -2
View File
@@ -169,11 +169,19 @@ type InlineReviewComment struct {
Body string
}
// ReviewCommentWriter posts line-anchored review comments on a PR, refusing
// ReviewSubmission is one submitted PR review. Event is COMMENT or REQUEST_CHANGES;
// empty means COMMENT. Body carries findings that have no line anchor.
type ReviewSubmission struct {
Event string
Body string
Comments []InlineReviewComment
}
// ReviewCommentWriter submits one review on a PR, refusing
// when the head has moved past reviewedHeadSHA. Empty reviewedHeadSHA skips
// the check.
type ReviewCommentWriter interface {
CreateReviewComments(ctx context.Context, owner, repo string, number int, reviewedHeadSHA string, comments []InlineReviewComment) error
CreateReviewComments(ctx context.Context, owner, repo string, number int, reviewedHeadSHA string, review ReviewSubmission) error
}
// WebhookEvent is one decoded webhook delivery. At most one field is set; none