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

Function hasCopilotRequestsWritePermission

pkg/cli/workflow_secrets.go:120–131  ·  view source on GitHub ↗
(frontmatter map[string]any)

Source from the content-addressed store, hash-verified

118}
119
120func hasCopilotRequestsWritePermission(frontmatter map[string]any) bool {
121 if frontmatter == nil {
122 return false
123 }
124 permissionsValue, ok := frontmatter["permissions"]
125 if !ok {
126 return false
127 }
128 perms := workflow.NewPermissionsParserFromValue(permissionsValue).ToPermissions()
129 level, exists := perms.Get(workflow.PermissionCopilotRequests)
130 return exists && level == workflow.PermissionWrite
131}
132
133func filterOutSecretRequirement(reqs []SecretRequirement, secretName string) []SecretRequirement {
134 filtered := make([]SecretRequirement, 0, len(reqs))

Callers 1

Calls 3

ToPermissionsMethod · 0.80
GetMethod · 0.45

Tested by

no test coverage detected