Repository navigation
Add iter_pull_request_reviews for pull request review history - #36
Open
bablukumar5xx wants to merge 1 commit into
Open
bablukumar5xx wants to merge 1 commit into
bablukumar5xx wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Who this helps
Teams and coding agents that audit one pull request's review history — to compare reruns, find the run that introduced a finding, or export every run to a dashboard — currently have to hand-roll cursor continuation, page/item bounds and cursor-loop detection around
list_pull_request_reviews().iter_reviews()is not a substitute: it lists the latest run of each pull request, not every run of a specific pull request. The sibling TypeScript SDK has an open request for the same iterator (prooflinedev/sdk-typescript#26), so this also closes the parity gap for Python callers.Both facades now expose
iter_pull_request_reviews(...), so the same loop works withProoflineClientandAsyncProoflineClient:Decisions
page_size/max_pages/max_itemscontrols andReviewFiltersasiter_reviews, with the same defaults (100 pages, 10,000 items) and 1..100 / 1..1000 / 1..100000 validation._next_cursor()guard so missing, non-advancing, repeated or malformed continuation cursors raise the existingurn:proofline:sdk:invalid-paginationerror, and reaching either bound raisesurn:proofline:sdk:pagination-limit._iteration_params()for the shared limit/filter/cursor-seed setup instead of duplicating the loop setup. Existingiter_reviews()behavior is unchanged.iter_pull_request_reviewsto the helper list inscripts/contracts.py. That contract keeps the sync and async facades in lockstep and already exemptsiter_reviewsas a helper.iter_reviewsand the bounds in the README.Verification
python3 scripts/check.pypasses end to end: generation check, operation/vocabulary contracts,ruff check,ruff format --check,mypy, the fullpytestsuite, wheel/sdist build, and the installed-artifact HTTP smoke test.repo/name+ pull request path, with thestatusfilter and initial/continuation cursors preserved;max_pages,max_items, and invalidpage_size;iter_reviewspagination tests continue to pass, covering the shared helper.