Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

group.members.get only working if result is within first 20 #499

Closed
@ericfrederich

Description

@ericfrederich

Description of the problem, including code/CLI snippet

group.members.get(userid) only seems to be working if that userid is within first 20 hits.
Run this on any group with more than 20 members:

group=gl.groups.get('some-group')# iterate over the exhaustive list of members as a generatorformemberingroup.members.list(as_list=False):# so this call should never fail; but it doesgroup.members.get(member.id)

Expected Behavior

Ultimately it should callhttps://docs.gitlab.com/ce/api/members.html#get-a-member-of-a-group-or-project with the exact group id and user id. This would be most efficient.

Alternatively it could call.list() in such a way that it is able to iterate over all results. For example.list(as_list=False) to force a generator to be returned or.list(all=True) to force the exhaustive list to be returned. But again, this is bad if there is a more efficient API to call as linked to above.

Actual Behavior

It ends up callingGetFromListMixin which ends up callinghttp_list with no arguments which just returns 20 items. It then compares those id's to the requested one.

Specifications

  • python-gitlab version: 1.3.0
  • API version you are using (v3/v4): 4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp