Repository navigation
Add iter_pull_request_reviews with tests and README - #108
Open
arjunsreelatha wants to merge 1 commit into
Open
arjunsreelatha wants to merge 1 commit into
arjunsreelatha 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.
Summary
solves #101
Setup of the tools and enviornment completed
list_pull_request_reviewsreturns one page, and nothing followed its continuation cursor. Callers that need every review on a pull request had to loop over cursors themselves and re-implement the cycle and bound checks. This PR addsiter_pull_request_reviewstoProoflineClientandAsyncProoflineClient, mirroringiter_reviews.Behaviour
next_cursorwhiletruncatedis true, keeping the organization, repository, and filters on every request.page_size(1..100),max_pages(1..1000), andmax_items(1..100000). Bounds must be integers, and invalid values raiseValueErrorbefore any request.urn:proofline:sdk:invalid-pagination.urn:proofline:sdk:pagination-limitwithout requesting another page. Finishing exactly at a bound is a normal end.iter_reviewsgets the same item-budget check, since it shares the loop.Verification
tests/test_http.py(sync and async) cover:page_size=0and fractionalmax_pages, rejected before any requestpytest tests: 220 passed.ruff checkandruff format --check: clean.mypy proofline: no issues.4798844: no findings.Environment note: the test run uses the pinned dev tools from
requirements-dev/pyproject.toml(pytest 9.2.0, pytest-asyncio 1.4.1, openapi-python-client 0.30.0).🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01ToC6VqPiYK8mT7841aWJtF