Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 2, 2025

Description

This PR adds the GITHUB_TOKEN environment variable to the MCP server installation step in the copilot setup workflow. This enables authenticated GitHub API requests when downloading releases, preventing rate limiting issues and improving installation reliability.

Changes

Modified .github/workflows/copilot-setup-steps.yml to set GITHUB_TOKEN from secrets in the "Install azsdk mcp server" step:

- name: Install azsdk mcp server
  shell: pwsh
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  run: |
    ./eng/common/mcp/azure-sdk-mcp.ps1 -InstallDirectory $HOME/bin

Why This Change Is Needed

The PowerShell installation script eng/common/scripts/Helpers/AzSdkTool-Helpers.ps1 already contains logic to check for the GITHUB_TOKEN environment variable (line 126) to authenticate GitHub API requests. However, the workflow was not providing this token, causing the script to fall back to unauthenticated requests which are subject to strict rate limits.

Benefits

  • Prevents rate limiting: Authenticated requests have much higher rate limits (5,000 vs 60 requests per hour)
  • Improved reliability: Reduces installation failures due to API rate limiting
  • Follows best practices: Aligns with how other workflows in this repository use GITHUB_TOKEN (e.g., summarize-impact.yaml)

Testing

  • Validated YAML syntax using yamllint
  • Verified the change follows existing patterns in other workflow files
  • Confirmed the script's existing logic will properly utilize the environment variable
Original prompt

Create a PR to set GITHUB_TOKEN as env variable when installing MCP server in copilot setup yaml. It should use GITHUB_TOKEN Secrets to the value.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@Copilot Copilot AI changed the title [WIP] Create a PR to set GITHUB_TOKEN as env variable when installing MCP server in copilot setup yaml. It should use GITHUB_TOKEN Secrets to the value. Add GITHUB_TOKEN environment variable to MCP server installation in copilot setup workflow Oct 2, 2025
@Copilot Copilot AI requested a review from praveenkuttappan October 2, 2025 20:01
Copilot finished work on behalf of praveenkuttappan October 2, 2025 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants