Auto-exclude copilot environment from CI/CD deployments#2279
Open
aholstrup1 wants to merge 3 commits into
Open
Auto-exclude copilot environment from CI/CD deployments#2279aholstrup1 wants to merge 3 commits into
aholstrup1 wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR prevents GitHub’s auto-created copilot environment (created when the Copilot coding agent is enabled) from being treated as a CI/CD deployment target by DetermineDeploymentEnvironments, avoiding Deploy job failures due to missing DeployTo* settings / auth context.
Changes:
- Implicitly appends
copilotto theexcludeEnvironmentslist (alongsidegithub-pages) inDetermineDeploymentEnvironments. - Documents the implicit exclusion of
copilotinScenarios/settings.md. - Adds a release note entry describing the fix for Issue #2277.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| Actions/DetermineDeploymentEnvironments/DetermineDeploymentEnvironments.ps1 | Excludes copilot from the environment enumeration used to build the deployment matrix. |
| Scenarios/settings.md | Updates settings documentation to note that copilot is implicitly excluded. |
| RELEASENOTES.md | Records the fix in the release notes. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
When the GitHub Copilot coding agent is enabled on a repository, GitHub auto-creates an environment named
copilot.DetermineDeploymentEnvironmentsenumerates all GitHub environments and was picking it up as a CD target, so the Deploy job ran with noDeployTosettings and no AuthContext secret and failed withAuthentication failedatDeploy.ps1:128.This treats
copilotthe same waygithub-pagesis already treated: it is appended to the implicitexcludeEnvironmentslist, so it never reaches the deployment matrix.Changes:
Actions/DetermineDeploymentEnvironments/DetermineDeploymentEnvironments.ps1- addcopilotnext togithub-pagesin the implicit exclude listScenarios/settings.md- mentioncopilotin the existingexcludeEnvironmentsdescriptionRELEASENOTES.md- note the fix under IssuesFixes: #2277