feat(copilot): use copilot-cli integration ID when authenticating with user PAT#37986
Closed
Copilot wants to merge 1 commit into
Closed
feat(copilot): use copilot-cli integration ID when authenticating with user PAT#37986Copilot wants to merge 1 commit into
Copilot wants to merge 1 commit into
Conversation
When COPILOT_GITHUB_TOKEN (user PAT) is used for authentication — i.e. not in BYOK mode and not using the GitHub Actions token via permissions.copilot-requests: write — set GITHUB_COPILOT_INTEGRATION_ID to "copilot-cli" (the copilot-sdk integration ID) instead of the AWF default "agentic-workflows". When using the GitHub Actions token (copilot-requests: write), keep the existing "agentic-workflows" integration ID. Adds CopilotCLIIntegrationIDUserPATValue constant and a new test TestCopilotEngineExecutionStepsWithCopilotRequestsUsesAgenticWorkflowsIntegrationID. Updates golden files and existing tests accordingly. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
feat: use copilot-cli integration ID when using user PAT
feat(copilot): use copilot-cli integration ID when authenticating with user PAT
Jun 9, 2026
Copilot created this pull request from a session on behalf of
pelikhan
June 9, 2026 01:29
View session
Collaborator
|
@copilot update the integration id env variable NAME to match the one used by copilot-cli |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When AWF uses
COPILOT_GITHUB_TOKEN(user PAT),GITHUB_COPILOT_INTEGRATION_IDwas always set toagentic-workflows. This is wrong for PAT auth — the Copilot SDK expectscopilot-cliin that case.Changes
pkg/constants/engine_constants.go: AddCopilotCLIIntegrationIDUserPATValue = "copilot-cli"constant alongside the existingagentic-workflowsvalue.pkg/workflow/copilot_engine_execution.go: Branch integration ID selection on auth mode after all env merges:!isBYOKMode && !useCopilotRequests) →"copilot-cli"copilot-requests: write) or BYOK →"agentic-workflows"pkg/workflow/copilot_engine_test.go: Update existing integration ID assertions for the PAT case; addTestCopilotEngineExecutionStepsWithCopilotRequestsUsesAgenticWorkflowsIntegrationIDto cover thecopilot-requests: writepath.