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

Method ViewerCanPush

api/queries_repo.go:267–274  ·  view source on GitHub ↗

ViewerCanPush is true when the requesting user has push access

()

Source from the content-addressed store, hash-verified

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