refactor!: Use a struct for `Repository.Permissions` instead of `map[string]bool` by Not-Dhananjay-Mishra · Pull Request #3936 · google/go-github

Closes: #3934
BREAKING CHANGE
Repository.Permissions now typed as a struct :

type RepositoryPermissions struct {
	Admin    *bool `json:"admin,omitempty"`
	Maintain *bool `json:"maintain,omitempty"`
	Push     *bool `json:"push,omitempty"`
	Triage   *bool `json:"triage,omitempty"`
	Pull     *bool `json:"pull,omitempty"`
}

According to the docs, the permissions object has a fixed, well-defined structure:

  "permissions": {
    "type": "object",
    "properties": {
      "admin": {
        "type": "boolean"
      },
      "maintain": {
        "type": "boolean"
      },
      "push": {
        "type": "boolean"
      },
      "triage": {
        "type": "boolean"
      },
      "pull": {
        "type": "boolean"
      }
    }
  }