MCPcopy Create free account
hub / github.com/github/gh-aw / IsGitHubAppOnlyScope

Function IsGitHubAppOnlyScope

pkg/workflow/permissions.go:196–202  ·  view source on GitHub ↗

IsGitHubAppOnlyScope returns true if the scope is a GitHub App-only permission (not supported by GITHUB_TOKEN). These scopes require a GitHub App to exercise.

(scope PermissionScope)

Source from the content-addressed store, hash-verified

194// IsGitHubAppOnlyScope returns true if the scope is a GitHub App-only permission
195// (not supported by GITHUB_TOKEN). These scopes require a GitHub App to exercise.
196func IsGitHubAppOnlyScope(scope PermissionScope) bool {
197 isAppOnly := slices.Contains(GetAllGitHubAppOnlyScopes(), scope)
198 if isAppOnly {
199 permissionsLog.Printf("Scope %q requires GitHub App (not supported by GITHUB_TOKEN)", scope)
200 }
201 return isAppOnly
202}
203
204// Permissions represents GitHub Actions permissions
205// It can be a shorthand (read-all, write-all, read, write, none) or a map of scopes to levels

Calls 2

PrintfMethod · 0.45

Tested by 1

TestIsGitHubAppOnlyScopeFunction · 0.68