CENG-355: Add --show-all flag to display all results from repo/package list#172
Conversation
…71' of github.com:cloudsmith-io/cloudsmith-cli into ceng-355-httpsgithubcomcloudsmith-iocloudsmith-clipull171
cf3ca3b to
c79c929
Compare
|
Code Climate has analyzed commit ce41ea2 and detected 10 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 87.5% (50% is the threshold). This pull request will bring the total coverage in the repository to 73.4% (1.1% change). View more on Code Climate. |
…71' of github.com:cloudsmith-io/cloudsmith-cli into ceng-355-httpsgithubcomcloudsmith-iocloudsmith-clipull171
There was a problem hiding this comment.
Pull Request Overview
This PR adds a --show-all flag to enable displaying all paginated results for repositories, packages, upstreams, and policies, addressing user requests to fetch complete result sets without manual pagination. The implementation includes validation to prevent conflicting usage with pagination flags, adds comprehensive test coverage, and includes minor documentation improvements.
Key changes:
- Added
--show-allflag with validation logic preventing concurrent use with--pageor--page-size - Implemented
paginate_results()utility function to automatically fetch all pages when flag is enabled - Updated output formatting to distinguish between paginated and complete result displays
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| cloudsmith_cli/cli/validators.py | Added validator to prevent --show-all from being used with pagination flags |
| cloudsmith_cli/cli/utils.py | Refactored list info printing and added paginate_results() function for automatic pagination |
| cloudsmith_cli/cli/decorators.py | Reordered option decorators to add --show-all flag before pagination options |
| cloudsmith_cli/cli/commands/upstream.py | Integrated --show-all flag into upstream list command |
| cloudsmith_cli/cli/commands/repos.py | Added --show-all support and adjusted output formatting for repositories |
| cloudsmith_cli/cli/commands/list_.py | Updated package list command to support --show-all flag |
| cloudsmith_cli/cli/commands/policy/vulnerability.py | Added --show-all support for vulnerability policies |
| cloudsmith_cli/cli/commands/policy/license.py | Added --show-all support for license policies |
| cloudsmith_cli/cli/commands/dependencies.py | Enhanced documentation to clarify slug_perm parameter |
| cloudsmith_cli/cli/tests/commands/*.py | Added test coverage for --show-all flag functionality and validation |
| CONTRIBUTING.md | Removed extraneous blank line |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR includes the suggestion/contribution from PR 171 (Issue 170)

--show-allflag to all supported pagination elements (Repo, Package, Upstream, Policy)slug_permto documentation for dependency command for clarity