Skip to content

Commit

Permalink
Add RoleName field to User struct (#2386)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua-hancox committed Jun 16, 2022
1 parent 74c4599 commit 697804f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
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

0 comments on commit 697804f

Please sign in to comment.