-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
Breaking API ChangePR will require a bump to the major version num in next release. Look here to see the change(s).PR will require a bump to the major version num in next release. Look here to see the change(s).enhancementgood first issue
Description
Similar to #3934
According to the List Collaborators Docs, the permissions object has a fixed, well-defined structure:
{
"permissions": {
"type": "object",
"properties": {
"pull": {
"type": "boolean"
},
"triage": {
"type": "boolean"
},
"push": {
"type": "boolean"
},
"maintain": {
"type": "boolean"
},
"admin": {
"type": "boolean"
}
}
}
}Currently it is typed as map[string]bool (It was added in 2015 so I guess it is safe to update):
Lines 69 to 73 in 1c42933
| // Permissions and RoleName identify the permissions and role that a user has on a given | |
| // repository. These are only populated when calling Repositories.ListCollaborators. | |
| Permissions map[string]bool `json:"permissions,omitempty"` | |
| RoleName *string `json:"role_name,omitempty"` | |
we can use RepositoryPermissions struct introduced in #3936
gmlewis
Metadata
Metadata
Assignees
Labels
Breaking API ChangePR will require a bump to the major version num in next release. Look here to see the change(s).PR will require a bump to the major version num in next release. Look here to see the change(s).enhancementgood first issue