chore(workflow): say in a review post failure whether it carried inline comments

This commit is contained in:
sam committed 2026-10-24 18:27:17 +11:00
1 parent 24f1174d9f
commit 092fae3aa4
1 file changed
+5 -2
+5 -2
View File
@@ -737,8 +737,11 @@ func postReview(ctx context.Context, tc *TaskContext, owner, repo string, number
}
tc.Log.Info("posting review", "inline", places, "body_bytes", len(review.Body), "diff_files", len(tc.prReview.files))
err := tc.Forge.CreateReviewComments(ctx, owner, repo, number, headSHA, review)
if err == nil || len(review.Comments) == 0 {
return err
if err == nil {
return nil
}
if len(review.Comments) == 0 {
return fmt.Errorf("%w (no inline comments; %d diff files)", err, len(tc.prReview.files))
}
tc.Log.Warn("forge refused inline review comments; posting them in the body", "err", err, "inline", places)
if retry := tc.Forge.CreateReviewComments(ctx, owner, repo, number, headSHA, forgeReview(findings, nil)); retry != nil {