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

Method RepositoryViewerPermission

api/queries_pr.go:339–344  ·  view source on GitHub ↗

RepositoryViewerPermission returns the requesting user's role on the repository, or an empty string when the "repository" field was not requested.

()

Source from the content-addressed store, hash-verified

337// RepositoryViewerPermission returns the requesting user's role on the
338// repository, or an empty string when the "repository" field was not requested.
339func (pr PullRequest) RepositoryViewerPermission() string {
340 if pr.Repository == nil {
341 return ""
342 }
343 return pr.Repository.ViewerPermission
344}
345
346func (pr PullRequest) IsOpen() bool {
347 return pr.State == "OPEN"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected