You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Give the pr_review Readers One Accessor Each for Commit Oid, Page Info, and Head Reviews #3460
The payload readers in scripts/pr_review_rounds.py and scripts/pr_review_checks.py, and digest in scripts/pr_review.py, spell three accessors out at each site:
(n.get("commit") or {}).get("oid") appears about nine times.
((pr.get(field) or {}).get("pageInfo") or {}).get(key) appears about six times.
The filter selecting one reviewer's reviews on the head appears four times.
Suggested Change
Add commit_oid(node), page_flag(pr, field, key), and one head-reviews filter in the readers, and move every lenient site onto them. One site in digest reads pr["reviewThreads"]["nodes"] strictly, so a malformed payload ends the run at exit 1. Keep that site strict rather than moving it onto a lenient accessor that would turn the failure into an empty reading.
Done When
Each accessor has one definition, every lenient site uses it, the strict site is unchanged, and the test suite passes unchanged.
Activity
Split pr_review.py's Check and Round Readers Into Leaf Modules (#3462)
Give the pr_review Readers One Accessor Each for Commit Oid, Page Inf…