Skip to content

Allow including inherited users for member_of/not_member_of

Conditions like author_member checks if the user directly belongs to the specified group or project. However, a user might belong to a group or project via a higher level group, instead of being a direct member.

For example, I want to check if the author of a MR is an external contributor, using not_member_of the project. The users belonging to the project's group but not directly to the project match the condition. That means, they are considered "not members".

It seems that Gitlab's API allows to list all members, including inherited ones: https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project-including-inherited-and-invited-members.

My request is to have the option of checking the full list of members with the member_of and not_member_of conditions. It can be done always, as this is probably the expected behaviour, or by adding a all: true or inherited: true to the author_member condition, for example.