Adding a member to a team always gives them the role of "maintainer" #140675
-
Select Topic AreaQuestion BodyI am using the gh api to add members to teams of my organization. Body parameters I want to assign the role of a The following
returns
I even tried removing the Any help or clarification is appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Double-check that the team doesn't contain any settings or permissions that could be overriding what you're trying to do. Sometimes orgs have rules that can automatically bump certain users to "maintainer." You can also try debugging with a simpler API call just to see what it returns without passing any role (since "member" is the default). Also, try updating to the latest version of the GitHub CLI if you haven't already. Could be something small that's been fixed in newer releases? If none of that works and you think it could be a bug, I would turn to GitHub support or open a ticket. |
Beta Was this translation helpful? Give feedback.
-
Hi @Topromm, thanks for the response. Concerning settings and permissions, I did not find anything about default roles in the team settings or organization settings. Can you please tell me where are the settings you are referring to? As for the simpler API call, I have already tried passing no role. The answer is still "maintainer" I am currently using gh 2.56. The latest is 2.58. Hard to think, that this might be the reason, but I will check. |
Beta Was this translation helpful? Give feedback.
-
Problem solved. The role is "maintainer" by default if the person is an owner. It does not matter if you provide a role explicitly. For non owners the role is indeed member. |
Beta Was this translation helpful? Give feedback.
Problem solved. The role is "maintainer" by default if the person is an owner. It does not matter if you provide a role explicitly. For non owners the role is indeed member.