Skip to content

Fix: use COPILOT_GITHUB_TOKEN secret directly in dependency-update workflows#1066

Merged
dgee2 merged 1 commit into
mainfrom
fix/copilot-github-token-secret
May 23, 2026
Merged

Fix: use COPILOT_GITHUB_TOKEN secret directly in dependency-update workflows#1066
dgee2 merged 1 commit into
mainfrom
fix/copilot-github-token-secret

Conversation

@dgee2

@dgee2 dgee2 commented May 23, 2026

Copy link
Copy Markdown
Owner

Summary

The three agentic dependency-update workflows fail at the activation step because COPILOT_GITHUB_TOKEN is not set. Investigation revealed:

  • The repository has no COPILOT_TOKEN secret (only AUTH0_CLIENT_SECRET exists)
  • The old dependency-update.yml also used secrets.COPILOT_TOKEN so was similarly broken
  • engine.env was mapping a non-existent secret, resulting in an empty env var

Change

Remove the engine.env block from all three workflow source files and recompile. gh-aw looks for COPILOT_GITHUB_TOKEN as a repository secret by default — no mapping needed.

Required action

Create a repository secret named COPILOT_GITHUB_TOKEN containing a fine-grained PAT with the "Copilot Requests" permission. See: https://docs.github.com/en/copilot/how-tos/copilot-cli/automate-copilot-cli/automate-with-actions

The repository has no COPILOT_TOKEN secret. gh-aw looks for
COPILOT_GITHUB_TOKEN by default so the engine.env mapping was
unnecessary. Removing it also removes the need for --approve on compile.

Requires a COPILOT_GITHUB_TOKEN repository secret to be created:
a fine-grained PAT with the 'Copilot Requests' permission.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 23, 2026 22:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the agentic dependency-update workflows by removing an invalid secret mapping (secrets.COPILOT_TOKEN) and standardizing on the expected repository secret name COPILOT_GITHUB_TOKEN, so the workflows can successfully activate and run.

Changes:

  • Removed engine.env mappings that referenced the non-existent secrets.COPILOT_TOKEN from all three dependency-update workflow source files.
  • Recompiled the generated lock workflows to reference secrets.COPILOT_GITHUB_TOKEN (including validation and log redaction).
  • Updated lockfile “secrets used” metadata to reflect COPILOT_GITHUB_TOKEN.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/dependency-update-node.md Removes invalid engine.env secret mapping so the engine uses the default secret name.
.github/workflows/dependency-update-node.lock.yml Updates compiled workflow to use secrets.COPILOT_GITHUB_TOKEN and adjusts secret lists/redaction accordingly.
.github/workflows/dependency-update-github-actions.md Removes invalid engine.env secret mapping so the engine uses the default secret name.
.github/workflows/dependency-update-github-actions.lock.yml Updates compiled workflow to use secrets.COPILOT_GITHUB_TOKEN and adjusts secret lists/redaction accordingly.
.github/workflows/dependency-update-dotnet.md Removes invalid engine.env secret mapping so the engine uses the default secret name.
.github/workflows/dependency-update-dotnet.lock.yml Updates compiled workflow to use secrets.COPILOT_GITHUB_TOKEN and adjusts secret lists/redaction accordingly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud

Copy link
Copy Markdown

@dgee2 dgee2 merged commit 0f918fc into main May 23, 2026
14 checks passed
@dgee2 dgee2 deleted the fix/copilot-github-token-secret branch May 23, 2026 22:10
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