MCPcopy
hub / github.com/cli/cli / ViewerCanPush

Method ViewerCanPush

api/queries_repo.go:266–273  ·  view source on GitHub ↗

ViewerCanPush is true when the requesting user has push access

()

Source from the content-addressed store, hash-verified

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