chore(workflow): say in a review post failure whether it carried inline comments
This commit is contained in:
1 file changed
+5
-2
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user