Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add rolename field to user struct #2386

Merged
merged 1 commit into from Jun 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions github/github-accessors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions github/github-accessors_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion github/github-stringify_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions github/users.go
Expand Up @@ -66,9 +66,10 @@ type User struct {
// See: search.go and https://docs.github.com/en/rest/search/#text-match-metadata
TextMatches []*TextMatch `json:"text_matches,omitempty"`

// Permissions identifies the permissions that a user has on a given
// repository. This is only populated when calling Repositories.ListCollaborators.
// 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"`
}

func (u User) String() string {
Expand Down