Repository navigation
fix: pass top and skip to the changed files call in repo_pull_request get - #1615
Merged
Dan Hellem (danhellem) merged 4 commits intoSep 24, 2026
Merged
Conversation
With includeChangedFiles, the get branch called getPullRequestIterationChanges with no top or skip, so it received the endpoint's default page of 100 and reported fileCount: 100 for any larger PR, with no way for the caller to ask for the rest: skip is on the schema but was only wired for list. Ask for the endpoint's maximum page (2000) and pass skip through. When the response has a nextSkip, add hasMore: true next to it so the caller can page the way every other paged tool here does. The last page arrives with nextSkip 0 or without it; both mean done.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1615 +/- ##
=======================================
Coverage ? 99.91%
=======================================
Files ? 23
Lines ? 2240
Branches ? 692
=======================================
Hits ? 2238
Misses ? 0
Partials ? 2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Nikola Pejic (nikolapeja6)
requested changes
Sep 23, 2026
Nikola Pejic (nikolapeja6)
approved these changes
Sep 24, 2026
Dan Hellem (danhellem)
approved these changes
Sep 24, 2026
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.
repo_pull_requestwithaction: "get"andincludeChangedFiles: truedid not passtoporskiptogetPullRequestIterationChanges, so callers could not retrieve changes beyond the first page (#1611).This change forwards the existing
topandskipparameters and documents how to request the next page usingnextSkipandnextTopfromchangedFilesSummary. The defaults remaintop: 100andskip: 0.GitHub issue number
#1611
Associated Risks
topandskipnow apply toget(changed files) as well aslist(pull requests). Both descriptions name both actions.topis not clamped, so a value above the documented maximum of 2000 reaches the service as written.iterations[iterations.length - 1]is re-read on every call. Page 2 can land on a newer iteration than page 1 if someone pushes in between.secondComparingIterationis in the summary whenever there is an iteration to compare, so a caller can see that. Iteration pinning is tracked in Expose pull request iteration identity in get_changes #1551.✅ PR Checklist
🧪 How did you test it?
Unit tests in
test/src/tools/repositories.test.tscover the default page size, a non-default page size, the continuation fields, both ways the endpoint ends a list, and the absence ofhasMore:topnorskipgiven: the schema fills in 100 and 0, and both reachgetPullRequestIterationChangestop: 100, skip: 0against the 150-file response recorded in repo_pull_request get: includeChangedFiles silently stops at 100 files #1611:fileCount: 100, the first entry is the first file,nextSkip: 100,nextTop: 50top: 50, skip: 100, following the REST example for this endpoint:fileCount: 50, the last entry is the 150th file, nonextSkipornextTopnextSkip: 0andnextTop: 0is surfaced as the API sent itincludeChangedFilestest asserts the two added arguments21 suites, 1298 tests passing.
npm run validate-tools,eslintandprettier --checkclean.