(frontmatter map[string]any)
| 118 | } |
| 119 | |
| 120 | func 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 | |
| 133 | func filterOutSecretRequirement(reqs []SecretRequirement, secretName string) []SecretRequirement { |
| 134 | filtered := make([]SecretRequirement, 0, len(reqs)) |
no test coverage detected