Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions github/github-accessors.go

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

5 changes: 1 addition & 4 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.

12 changes: 6 additions & 6 deletions github/security_advisories_test.go
Original file line numberDiff line numberDiff line change
Expand Up@@ -1257,7 +1257,7 @@ func TestRepoAdvisoryCreditDetailed_Marshal(t *testing.T) {
},
},
},
Permissions: map[string]bool{"p1": true},
Permissions: &RepositoryPermissions{Pull: Ptr(true)},
RoleName: Ptr("r"),
},
}
Expand DownExpand Up@@ -1323,7 +1323,7 @@ func TestRepoAdvisoryCreditDetailed_Marshal(t *testing.T) {
}
],
"permissions": {
"p1": true
"pull": true
},
"role_name": "r"
}
Expand DownExpand Up@@ -1396,7 +1396,7 @@ func TestCredit_Marshal(t *testing.T) {
},
},
},
Permissions: map[string]bool{"p1": true},
Permissions: &RepositoryPermissions{Pull: Ptr(true)},
RoleName: Ptr("r"),
},
}
Expand DownExpand Up@@ -1461,7 +1461,7 @@ func TestCredit_Marshal(t *testing.T) {
}
],
"permissions": {
"p1": true
"pull": true
},
"role_name": "r"
}
Expand DownExpand Up@@ -1554,7 +1554,7 @@ func TestGlobalSecurityAdvisory_Marshal(t *testing.T) {
},
},
},
Permissions: map[string]bool{"p1": true},
Permissions: &RepositoryPermissions{Pull: Ptr(true)},
RoleName: Ptr("r"),
},
},
Expand DownExpand Up@@ -1708,7 +1708,7 @@ func TestGlobalSecurityAdvisory_Marshal(t *testing.T) {
}
],
"permissions": {
"p1": true
"pull": true
},
"role_name": "r"
},
Expand Down
4 changes: 2 additions & 2 deletions github/users.go
Original file line numberDiff line numberDiff line change
Expand Up@@ -68,8 +68,8 @@ type User struct {

// 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"`
Permissions *RepositoryPermissions `json:"permissions,omitempty"`
RoleName *string `json:"role_name,omitempty"`

// Assignment identifies how a user was assigned to an organization role. Its
// possible values are: "direct", "indirect", "mixed". This is only populated when
Expand Down
Loading