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)
| 72 | // - assigning "copilot" to issues |
| 73 | // - adding "copilot" as PR reviewer |
| 74 | func 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: |