Skip to content

Commit c827ff3

Browse files
committed
Refactor GitHub Actions workflows to replace 'github-token' with 'copilot-token' for improved access control
1 parent 4fe2699 commit c827ff3

11 files changed

Lines changed: 17 additions & 14 deletions

.github/workflows/copilot-ci-fix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- uses: actions/checkout@v6
1212
- uses: austenstone/copilot-cli@main
1313
with:
14-
github-token: ${{ secrets.PAT }}
14+
copilot-token: ${{ secrets.PAT }}
1515
# enable-all-github-mcp-tools: true
1616
mcp-config: |
1717
{

.github/workflows/copilot-comment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Run Copilot
1616
uses: austenstone/copilot-cli@main
1717
with:
18-
github-token: ${{ secrets.PAT }}
18+
copilot-token: ${{ secrets.PAT }}
1919
prompt: |
2020
${{ steps.sanitize.outputs.prompt }}
2121

.github/workflows/copilot-dependabot-update.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ jobs:
1414
id: metadata
1515
uses: dependabot/fetch-metadata@v2
1616
with:
17-
github-token: ${{ secrets.GITHUB_TOKEN }}
17+
copilot-token: ${{ secrets.GITHUB_TOKEN }}
1818

1919
- name: Generate dependency analysis with Copilot
2020
uses: austenstone/copilot-cli@main
2121
env:
2222
CONTEXT7_API_KEY: ${{ secrets.CONTEXT7_API_KEY }}
2323
with:
24-
github-token: ${{ secrets.PAT }}
24+
copilot-token: ${{ secrets.PAT }}
2525
mcp-config: |
2626
{
2727
"mcpServers": {

.github/workflows/copilot-pr-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- uses: actions/checkout@v6
1111
- uses: austenstone/copilot-cli@main
1212
with:
13-
github-token: ${{ secrets.PAT }}
13+
copilot-token: ${{ secrets.PAT }}
1414
prompt: |
1515
## Role
1616

.github/workflows/copilot-research.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
env:
1212
FIRECRAWL_API_KEY: ${{ secrets.FIRECRAWL_API_KEY }}
1313
with:
14-
github-token: ${{ secrets.PAT }}
14+
copilot-token: ${{ secrets.PAT }}
1515
mcp-config: |
1616
{
1717
"mcpServers": {

.github/workflows/copilot-security-triage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
- uses: actions/checkout@v6
99
- uses: austenstone/copilot-cli@main
1010
with:
11-
github-token: ${{ secrets.PAT }}
11+
copilot-token: ${{ secrets.PAT }}
1212
prompt: |
1313
## Role
1414

.github/workflows/copilot-triage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
ISSUE_BODY: '${{ github.event.issue.body }}'
4949
AVAILABLE_LABELS: '${{ steps.get_labels.outputs.available_labels }}'
5050
with:
51-
github-token: ${{ secrets.PAT }}
51+
copilot-token: ${{ secrets.PAT }}
5252
prompt: |
5353
## Role
5454

.github/workflows/copilot-usage-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
steps:
88
- uses: austenstone/copilot-cli@main
99
with:
10-
github-token: ${{ secrets.PAT }}
10+
copilot-token: ${{ secrets.PAT }}
1111
prompt: |
1212
## Role
1313

.github/workflows/test-copilot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
- uses: actions/checkout@v5
1010
- uses: austenstone/copilot-cli@main
1111
with:
12-
github-token: ${{ secrets.PAT }}
12+
copilot-token: ${{ secrets.PAT }}
1313
enable-all-github-mcp-tools: true
1414
prompt: |
1515
Who are you?

README.md

2 Bytes

Basic Setup

Add the following workflow to your .github/workflows folder:

name: 'Copilot Automation'
on: [issues, pull_request]

jobs:
  copilot-advanced:
    runs-on: ubuntu-latest
    steps:
      - name: 'Checkout Repository'
        uses: actions/checkout@v5
      - name: 'Run Copilot with Custom Config'
        uses: austenstone/copilot-cli@v1
        with:
          copilot-token: ${{ secrets.COPILOT_TOKEN }}
          github-token: ${{ secrets.COPILOT_TOKEN }}
          prompt: |
            Review this pull request for:
            1. Code quality and best practices
            2. Security vulnerabilities
            3. Performance implications
            4. Documentation completeness
          mcp-config: |
            {
              "mcpServers": {
                "time": {
                  "command": "uvx",
                  "args": [
                    "mcp-server-time",
                    "--local-timezone",
                    "America/New_York"
                  ],
                  "tools": ["*"]
                }
              }
            }

Configuration

Input Parameters

MCP Server Configuration

The action supports Model Context Protocol (MCP) servers for extending Copilot's capabilities. Configure MCP servers using JSON format with an mcpServers object where each key is the server name and the value contains its configuration.

0 commit comments

Comments
 (0)