Fix: use COPILOT_GITHUB_TOKEN secret directly in dependency-update workflows#1066
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
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.envmappings that referenced the non-existentsecrets.COPILOT_TOKENfrom 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.
|
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.



Summary
The three agentic dependency-update workflows fail at the activation step because
COPILOT_GITHUB_TOKENis not set. Investigation revealed:COPILOT_TOKENsecret (onlyAUTH0_CLIENT_SECRETexists)dependency-update.ymlalso usedsecrets.COPILOT_TOKENso was similarly brokenengine.envwas mapping a non-existent secret, resulting in an empty env varChange
Remove the
engine.envblock from all three workflow source files and recompile. gh-aw looks forCOPILOT_GITHUB_TOKENas a repository secret by default — no mapping needed.Required action
Create a repository secret named
COPILOT_GITHUB_TOKENcontaining 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