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

Function getEffectiveMaintenanceGitHubToken

pkg/workflow/github_token.go:54–62  ·  view source on GitHub ↗

getEffectiveMaintenanceGitHubToken returns the configured GitHub token secret expression to use for maintenance compile-workflows operations. No fallback chain is applied here. Maintenance compile PR mode must use the explicitly configured secret so the generated workflow does not silently fall bac

(secretName string)

Source from the content-addressed store, hash-verified

52// explicitly configured secret so the generated workflow does not silently fall
53// back to a token without permission to write workflow files.
54func getEffectiveMaintenanceGitHubToken(secretName string) string {
55 secretName = strings.TrimSpace(secretName)
56 if secretName == "" {
57 tokenLog.Print("No maintenance compile GitHub token secret configured")
58 return ""
59 }
60 tokenLog.Printf("Using configured maintenance compile GitHub token secret %q", secretName)
61 return wrapGitHubExpression("secrets." + secretName)
62}
63
64// getEffectiveCopilotRequestsToken returns the GitHub token to use for Copilot-related operations,
65// with precedence:

Callers 1

Calls 3

wrapGitHubExpressionFunction · 0.85
PrintMethod · 0.80
PrintfMethod · 0.45

Tested by

no test coverage detected