Skip to content

/groups/:id/members/all for cli does not contain correct parameters #848

Closed

Description

@dgsmith

Description of the problem, including code/CLI snippet

When using the CLI command: gitlab group-member all [...] the accepted parameters are incorrect. The all "endpoint" should operate just like the list, allowing paging, etc. instead, it seems to have some other specific commands that aren't necessary.

Expected Behavior

Being able to use commands such as,

  • gitlab group-member all --group-id 212 --page 2
  • gitlab group-member all --group-id 212 --per-page 2 --page 10
  • etc.

Actual Behavior

gitlab group-member all only accepts:

 -h, --help           show this help message and exit
  --group-id GROUP_ID
  --sudo SUDO
  --id ID

as specified in the gitlab docs --id is not necessary and you should actually be able to search (probably something to add for the normal list as well.

Specifications

  • python-gitlab version: 1.10.0
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com): 12.0.3-ee

Activity

  1. chrisoldwood commented on Jan 30, 2020

    @chrisoldwood

    I believe this is related to #593 about the runner all verb as that behaves in the same way.

    I used the group member code to work out why the runner all JSON support was broken but couldn't address the spurious --id argument. I added some thoughts on ticket #593, e.g. an all-runners list alternative object type, and a pointer about where in the CLI handling it might be making the assumption around why the --id argument is mandatory, but know too little at present to make a serious proposal 🙂.

    I can envisage a possible "hack" where a custom action named all would bypass the logic around looking for an object's id attribute. This would potentially fix both cases but maybe there is some cleaner way of signalling that all is more like list and acts on an entire collection instead of a single item?

  2. pvshingala1997 commented on Oct 17, 2020

    @pvshingala1997

    Can you assign this to me?

  3. added a commit that references this issue on Jan 13, 2022
    755e0a3
  4. locked as resolved and limited conversation to collaborators on Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions