MCPcopy Create free account
hub / github.com/cli/cli / ViewerCanPush

Method ViewerCanPush

api/queries_repo.go:268–275  ·  view source on GitHub ↗

ViewerCanPush is true when the requesting user has push access

()

Source from the content-addressed store, hash-verified

266
267// ViewerCanPush is true when the requesting user has push access
268func (r Repository) ViewerCanPush() bool {
269 switch r.ViewerPermission {
270 case "ADMIN", "MAINTAIN", "WRITE":
271 return true
272 default:
273 return false
274 }
275}
276
277// ViewerCanTriage is true when the requesting user can triage issues and pull requests
278func (r Repository) ViewerCanTriage() bool {

Callers 5

HeadReposMethod · 0.80
TestGitHubRepo_successFunction · 0.80
CanPushToRepoFunction · 0.80
RepoFindForksFunction · 0.80

Calls

no outgoing calls

Tested by 2

TestGitHubRepo_successFunction · 0.64