Skip to content

.NET: Fix Copilot Actions token environment in integration workflows #7425

Description

@moonbox3

The Copilot integration and sample validation workflows grant copilot-requests: write, but expose the built-in Actions token through COPILOT_GITHUB_TOKEN. Copilot CLI treats that variable as a user/PAT credential and can fail with Failed to fetch PAT user login (401): Bad credentials.

Use the native GITHUB_TOKEN environment variable for Actions authentication, while preserving COPILOT_GITHUB_TOKEN support for local user-token integration testing. Update both Python and .NET integration-test guards to recognize either supported environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETUsage: [Issues, PRs], Target: .NetpythonUsage: [Issues, PRs], Target: Python

    Type

    No type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions