-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Git provider
Other
System Info
Gitea: 1.23.6
Docker image: codiumai/pr-agent:0.31-gitea_app
Bug details
Description
Some Python API wrapper methods in the Gitea provider do not handle pagination correctly. As a result, when fetching data related to a pull request, only the first page of results is returned (default limit: 30 items), causing incomplete data retrieval for PRs with more items.
This impacts pull requests that contain more than 30 files or commits.
Affected Endpoints
The following API wrappers are affected:
get_change_file_pull_request():repos/{owner}/{repo}/pulls/{pr_number}/filesget_pr_commits():/repos/{owner}/{repo}/pulls/{pr_number}/commits
Current Behavior
Only the first page of results is fetched.
Pagination parameters (e.g. page, limit) are not iterated.
PRs with more than 30 files or commits return incomplete data.
Expected Behavior
All pages should be fetched until no more results are returned.
The full list of files and commits for a pull request should be available, regardless of size.