It appears the Repositories.ListTeams(Docs) API call returns a field permissions on each team which includes the more detailed set of permissions with triage/maintain.
A similar field is currently populated on User when calling Repositories.ListCollaborators([Docs].(https://docs.github.com/en/rest/reference/repos#list-repository-collaborators))
Example
Tested on Github Enterprise v3.0.6
https://<github-host>/api/v3/repos/test-org/test-repo/teams
[
{
"name": "Example Team",
"id": 99,
"node_id": "...",
"slug": "example-team",
"description": "",
"privacy": "closed",
"url": "...",
"html_url": "...",
"members_url": "...",
"repositories_url": "...",
"permission": "push",
"permissions": {
"pull": false,
"triage": false,
"push": false,
"maintain": true,
"admin": false
},
"parent": null
},
]
Docs
This endpoint appears to be the same in Enterprise 3.0 and Github.com.
Proposal
Add a Permissions field identical to what exists on User to the Team type.
It appears the
Repositories.ListTeams(Docs) API call returns a fieldpermissionson each team which includes the more detailed set of permissions with triage/maintain.A similar field is currently populated on User when calling
Repositories.ListCollaborators([Docs].(https://docs.github.com/en/rest/reference/repos#list-repository-collaborators))Example
Tested on Github Enterprise v3.0.6
https://<github-host>/api/v3/repos/test-org/test-repo/teams[ { "name": "Example Team", "id": 99, "node_id": "...", "slug": "example-team", "description": "", "privacy": "closed", "url": "...", "html_url": "...", "members_url": "...", "repositories_url": "...", "permission": "push", "permissions": { "pull": false, "triage": false, "push": false, "maintain": true, "admin": false }, "parent": null }, ]Docs
This endpoint appears to be the same in Enterprise 3.0 and Github.com.
Proposal
Add a Permissions field identical to what exists on User to the Team type.