-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check Gitlab via API if CODEOWNERS are all existing users/groups that can approve #191
Comments
And the same for Github. https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#list-repository-teams |
https://docs.gitlab.com/ee/user/project/codeowners/advanced.html#zero-owners
|
https://docs.gitlab.com/ee/user/project/codeowners/reference.html#add-a-group-as-a-code-owner
I checked: Any inherited member (like in a parent group) is indeed NOT added as a code owner. |
https://docs.gitlab.com/ee/user/project/codeowners/reference.html#add-a-role-as-a-code-owner
|
Idea: Verify if all users have a high enough access level to actually approve (list good/bad and then either warn or fail)
As part of the enforcer component:
Read the CODEOWNERS file
Get the actually known users from Gitlab
curl -X GET --header "PRIVATE-TOKEN: glpat-xxxxxxxxxxxxxxxxxx" https://gitlab.example.nl/api/v4/projects/1234/members
Verify if all users have a high enough access level to actually approve
https://docs.gitlab.com/ee/api/access_requests.html#valid-access-levels
https://docs.gitlab.com/ee/user/project/merge_requests/approvals/rules.html#eligible-approvers
The text was updated successfully, but these errors were encountered: