Query custom roles for combinations of user+repository or team+repository as assigned in the GUI #27588
Unanswered
ckunki
asked this question in
Enterprise
Replies: 1 comment
-
|
API https://docs.github.com/en/enterprise-cloud@latest/rest/collaborators/collaborators?apiVersion=2022-11-28 gives custom repository roles for user in organization |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Background
My organization has about 250 repositories on github.com, many of them public and is already happily using GraphQL and GitHub API to create different overviews of these repositories.
The organization manages permissions by assigning (custom) roles to combinations of user+repository or team+repository and is heavily interested in additional features.
Observations
Querying the organization (e.g. with a GraphQL query like
organization(login: "x") { name membersWithRole(first: 10)) only returns roles of the user within the organization, not considering specific repositories.Querying a particular repository (e.g. with a GraphQL query like
repository(owner:"x", name:"y") { collaborators {) seems to return default github roles but not custom roles initially assigned to the combination user+rep in the GUI.Also when giving permissions to a team the result seems to be expanded, i.e. it contains all users that are member of the team, but not the team as such anymore.
Questions
Is there a way to inquire the (custom) roles for originally assigned combinations of user+repository and team+repository in the GUI?
If not: Are there any plans to enhance either GraphQL or github REST API in future to support such type of queries?
Beta Was this translation helpful? Give feedback.
All reactions