Commit 8cd6f20
committed
fix(gitlab[_warn_truncation]) Qualify truncation warning when client filters active
why: _warn_truncation shows "Showing N of M" where M comes from the x-total
header (unfiltered server count). When --skip-group/--language/--topics are
active, M includes excluded projects, misleading users about how many repos
they actually care about. The GitLab API provides no server-side equivalent
for skip_groups; client-side filtering is unavoidable.
what:
- Add has_client_filters kwarg to _warn_truncation
- When True: warn "N total on server (note: server total includes filtered)"
- When False: existing "Showing N of M" message unchanged
- Pass has_client_filters=bool(options.skip_groups or options.language or options.topics)
from both _fetch_search and _paginate_repos
- Remove TODO comment
- Add test_gitlab_truncation_warning_with_client_filter in test_gitlab.py1 parent 9be48eb commit 8cd6f20
2 files changed
Lines changed: 73 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
245 | 253 | | |
246 | 254 | | |
247 | 255 | | |
| |||
325 | 333 | | |
326 | 334 | | |
327 | 335 | | |
328 | | - | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
329 | 345 | | |
330 | 346 | | |
331 | 347 | | |
332 | 348 | | |
333 | 349 | | |
334 | 350 | | |
335 | 351 | | |
| 352 | + | |
| 353 | + | |
336 | 354 | | |
337 | 355 | | |
338 | 356 | | |
339 | 357 | | |
340 | 358 | | |
341 | 359 | | |
342 | | - | |
| 360 | + | |
343 | 361 | | |
344 | 362 | | |
345 | 363 | | |
346 | | - | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
347 | 367 | | |
348 | 368 | | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
349 | 373 | | |
350 | 374 | | |
351 | 375 | | |
352 | 376 | | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | 377 | | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
365 | 393 | | |
366 | 394 | | |
367 | 395 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
858 | 858 | | |
859 | 859 | | |
860 | 860 | | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
861 | 891 | | |
862 | 892 | | |
863 | 893 | | |
| |||
0 commit comments