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

+4 -4
View File
@@ -287,13 +287,13 @@ func (f *Forge) ReplyToReview(ctx context.Context, owner, repo string, number in
return err
}
func (f *Forge) CreateReviewComments(ctx context.Context, owner, repo string, number int, reviewedHeadSHA string, comments []forge.InlineReviewComment) error {
in := make([]*forgev1.InlineReviewComment, 0, len(comments))
for _, c := range comments {
func (f *Forge) CreateReviewComments(ctx context.Context, owner, repo string, number int, reviewedHeadSHA string, review forge.ReviewSubmission) error {
in := make([]*forgev1.InlineReviewComment, 0, len(review.Comments))
for _, c := range review.Comments {
in = append(in, &forgev1.InlineReviewComment{Path: c.Path, Line: int32(c.Line), Body: c.Body}) // line numbers fit int32
}
_, err := call(ctx, f, "create review comments", func(c forgev1.ForgeServiceClient) (*forgev1.CreateReviewCommentsResponse, error) {
return c.CreateReviewComments(ctx, &forgev1.CreateReviewCommentsRequest{PullRequest: prRef(owner, repo, number), ReviewedHeadSha: reviewedHeadSHA, Comments: in})
return c.CreateReviewComments(ctx, &forgev1.CreateReviewCommentsRequest{PullRequest: prRef(owner, repo, number), ReviewedHeadSha: reviewedHeadSHA, Event: review.Event, Body: review.Body, Comments: in})
})
return err
}