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

Function getEffectiveCopilotRequestsToken

pkg/workflow/github_token.go:74–80  ·  view source on GitHub ↗

getEffectiveCopilotRequestsToken returns the GitHub token to use for Copilot-related operations, with precedence: 1. Custom token passed as parameter (e.g., from safe-outputs config github-token field) 2. secrets.COPILOT_GITHUB_TOKEN (recommended token for Copilot operations) Note: The default GITHU

(customToken string)

Source from the content-addressed store, hash-verified

72// - assigning "copilot" to issues
73// - adding "copilot" as PR reviewer
74func getEffectiveCopilotRequestsToken(customToken string) string {
75 if customToken != "" {
76 tokenLog.Print("Using custom Copilot GitHub token")
77 return customToken
78 }
79 return "${{ secrets.COPILOT_GITHUB_TOKEN }}"
80}
81
82// getEffectiveCopilotCodingAgentGitHubToken returns the GitHub token to use for agent assignment operations,
83// with precedence:

Calls 1

PrintMethod · 0.80

Tested by 1