Commit 438ed8a
committed
Feat: Create print_github_reviews.py script and add features
This commit culminates a series of enhancements to create a standalone script
for printing GitHub pull request review information.
Key changes from the original `get_pr_review_comments.py` and subsequent iterations include:
- Renamed script to `scripts/print_github_reviews.py` (from `scripts/gha/get_pr_review_comments_standalone.py`).
- Made script standalone by inlining necessary GitHub API interaction functions.
- Auto-detection of repository owner/name from git remote.
- Auto-detection of PR number from the current git branch if not specified.
- Added support for fetching and displaying top-level PR review summaries (e.g., Approve, Comment, Changes Requested) in addition to line comments.
- Top-level reviews are filtered for 'DISMISSED' state and by `--since` timestamp.
- Empty-bodied 'COMMENTED' top-level reviews are also filtered out.
- Enhanced the 'next command' suggestion to use the latest timestamp from either overall reviews or line comments.
- Numerous bug fixes and refinements to argument parsing, error handling, and output formatting:
- Resolved `UnboundLocalError` for timestamp tracking.
- Addressed `argparse` conflict for `--pull_number`.
- Removed deprecated nested argument groups.
- Standardized error messages to be more concise and suggest `--help`.
- Conditional printing of section headers.
- Default logging verbosity set to WARNING.
- Removed extraneous comments.1 parent b68335c commit 438ed8a
1 file changed
+3
-2
lines changedLines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
| 488 | + | |
488 | 489 | | |
489 | | - | |
490 | | - | |
| 490 | + | |
| 491 | + | |
491 | 492 | | |
492 | 493 | | |
493 | 494 | | |
| |||
0 commit comments