-
Notifications
You must be signed in to change notification settings - Fork 119
Add copilot-setup-steps.yml to customize development environment for Copilot Coding Agent #1359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
Co-authored-by: dylan-smith <1508559+dylan-smith@users.noreply.github.com>
Copilot finished work on behalf of
dylan-smith
June 12, 2025 20:33
dylan-smith
reviewed
Jun 12, 2025
dylan-smith
reviewed
Jun 12, 2025
dylan-smith
reviewed
Jun 12, 2025
Co-authored-by: dylan-smith <1508559+dylan-smith@users.noreply.github.com>
Copilot finished work on behalf of
dylan-smith
June 12, 2025 21:01
dylan-smith
reviewed
Jun 12, 2025
Co-authored-by: dylan-smith <1508559+dylan-smith@users.noreply.github.com>
Copilot finished work on behalf of
dylan-smith
June 12, 2025 21:03
The file must be in the |
Co-authored-by: dylan-smith <1508559+dylan-smith@users.noreply.github.com>
Copilot finished work on behalf of
dylan-smith
June 12, 2025 21:06
Co-authored-by: dylan-smith <1508559+dylan-smith@users.noreply.github.com>
Moved the copilot-setup-steps.yml file to .github/workflows/ folder and updated the path references in the workflow triggers. (588bc68) |
offbyone
approved these changes
Jun 20, 2025
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.
This PR adds a
copilot-setup-steps.yml
workflow file to customize the development environment for GitHub Copilot Coding Agent, preventing it from trying to modify the .NET SDK version in future PRs.Problem
Copilot Coding Agent has been consistently trying to change the .NET SDK version in PRs from the repository's specified version (8.0.410 in
global.json
) to match the version installed in the Copilot environment (8.0.116). This requires manual intervention to revert these unwanted changes in each PR.Solution
Added
.github/copilot-setup-steps.yml
that explicitly instructs Copilot how to set up the development environment to match the repository's requirements. The workflow includes the essential steps:actions/setup-dotnet@v2
withglobal-json-file: global.json
to ensure the correct SDK version (8.0.410)dotnet restore src/OctoshiftCLI.sln
dotnet format src/OctoshiftCLI.sln --verify-no-changes
dotnet build src/OctoshiftCLI.sln --no-restore
Expected Outcome
With this configuration, Copilot will use the repository's specified .NET SDK version from
global.json
instead of trying to modify the project to match its environment. This eliminates the need for manual intervention in PRs to revert SDK version changes.Verification
✅ Tested that setup steps work correctly with .NET SDK 8.0.410
✅ Verified all builds pass: restore, format, build, and tests (888 tests passing)
✅ Confirmed no unwanted changes to existing files
✅ Minimal change: only 1 new file added
Fixes #1358.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.