Search all pages of diff files in `rbt review add-diff-comment`
Review Request #15290 — Created Sept. 11, 2026 and updated
AddDiffComment.add_commentiterateddiffset.get_files(), which only yields
the first page of results (25 files by default). Any file beyond the first page
could not be matched, sorbt review add-diff-comment -ffailed with
"Could not find a file ..." on diffs containing more than 25 files.This changes the loop to iterate
diffset.get_files().all_items, which follows
thenextlink and walks every page of the file list.Regression tests are added in
rbtools/commands/tests/test_review.pythat build
a real two-pageFileDiffListResourceviaURLMapTransport: one test posts to
a file on the second page (this fails without the fix, raising the
"Could not find a file"CommandError), and one covers a file on the first page
to guard the normal behavior.Co-authored with Claude Code.
pytest rbtools/commands/tests/test_review.py— 2 passed.Verified the second-page regression test fails without the fix (raising
CommandError: Could not find a file ...) and passes with it.
| Summary | ID |
|---|---|
| 8d1586b4b3d3f2e9e1d7e87a767a1385bd35ed54 |