refactor!: Use `RepositoryPermissions` struct for `User.Permissions` by niveshdandyan · Pull Request #3963 · google/go-github

@niveshdandyan

Replace map[string]bool with *RepositoryPermissions struct for the
User.Permissions field, providing better type safety and consistency
with the existing Repository.Permissions field.

The permissions object has a well-defined structure according to the
GitHub API docs, making a struct more appropriate than a dynamic map.

Fixes #3947

@gmlewis changed the title refactor: use RepositoryPermissions struct for User.Permissions refactor!: Use RepositoryPermissions struct for User.Permissions

Feb 3, 2026

Not-Dhananjay-Mishra