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):
|
// 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
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):go-github/github/users.go
Lines 69 to 73 in 1c42933
we can use
RepositoryPermissionsstruct introduced in #3936