Skip to content

Commit 5df954d

Browse files
Refine: Exclude empty 'COMMENTED' overall reviews from output
Further refines the display of top-level pull request review summaries. Overall reviews that have a state of "COMMENTED" and an empty (or whitespace-only) body are now filtered out and not displayed. This helps to reduce noise from review submissions that don't contain a summary message, while still showing approvals, changes requested, or commented reviews that do have content.
1 parent 5c825a8 commit 5df954d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/gha/get_pr_review_comments_standalone.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,12 @@ def parse_repo_url(url_string):
413413
continue
414414
except ValueError as ve:
415415
sys.stderr.write(f"Warning: Could not parse review submitted_at timestamp '{submitted_at_str}' or --since timestamp '{args.since}': {ve}\n")
416-
# Decide: skip review or include it if parsing fails? For now, include.
416+
# If parsing fails, we might choose to include the review to be safe, or skip. Current: include.
417+
418+
# New filter: Exclude "COMMENTED" reviews with an empty body
419+
if review.get("state") == "COMMENTED" and not review.get("body", "").strip():
420+
continue
421+
417422
filtered_overall_reviews.append(review)
418423

419424
# Sort by submission time, oldest first

0 commit comments

Comments
 (0)