feat(list): add project list filter for all non-archived projects
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
Description
By default API options were set to filter only FilterOwned projects and the function only set FilterOwned if -a was not set. I changed to set l.Owned = False for opts.FilterAll so users actually get all projects rather than just their own. I also moved setting of l.Archived to outside conditional so -a and --archived can be used in conjunction. This was done for both listAllProjectsForGroup and listAllProjects so the same functionality can be expected for using --group GROUP or without.
-
feat(list): add project list filter for all non-archived projects
-
Fixing iterator and adding tests
-
chore: moving function
-
chore: moving around some functions for reordering command
Related Issues
Resolves #7705 (closed)
How has this been tested?
Screenshots (if appropriate):
Added test for listAllProjects. Modified http stubs for tests since owned=true is no longer default and -a needs to be explicitly tested.
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change) -
Documentation -
Chore (Related to CI or Packaging to platforms) -
Test gap