-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Clean up copilot workspace after setup steps #30113
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
Conversation
Co-authored-by: mattleibow <[email protected]>
Co-authored-by: mattleibow <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reset the cgmanifest.json and templatestrings.json files
.github/copilot-instructions.md
Outdated
- Use `git checkout -- <file>` or `git restore <file>` to reset individual files | ||
- Use `git reset --hard HEAD` to reset all tracked files while preserving untracked build artifacts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete these lines and merge this section with the section above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Removed the git command lines and merged the sections as requested in commit a5b2d89.
Co-authored-by: mattleibow <[email protected]>
Reset the cgmanifest.json and templatestrings.json files. just before doing any work at all, reset the git directory. This should delete the files. If these files exist after your work is done, make sure to reset these files again. Don't try fancy things, just reset all the cgmanifest.json and templatestrings.json files |
Co-authored-by: mattleibow <[email protected]>
Reset all cgmanifest.json and templatestrings.json files to their original state (before my commits) in commit 1c1beca. |
@PureWeen this comment seems to make it be sensible, but hopefully the merge fixes it |
* Initial plan for issue * Initial plan for copilot workspace cleanup Co-authored-by: mattleibow <[email protected]> * Add copilot workspace cleanup and reset guidelines Co-authored-by: mattleibow <[email protected]> * Remove git command lines from copilot instructions per review feedback Co-authored-by: mattleibow <[email protected]> * Reset cgmanifest.json and templatestrings.json files to original state Co-authored-by: mattleibow <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: mattleibow <[email protected]>
The copilot setup steps workflow was leaving generated files in the working directory that shouldn't be committed. This PR adds cleanup steps to reset tracked files while preserving build artifacts.
Changes Made
1. Added workspace cleanup to copilot-setup-steps.yml
git reset --hard HEAD
to clean up any tracked files modified during the build processartifacts/
directory while resetting generated files likecgmanifest.json
2. Enhanced copilot-instructions.md with reset guidelines
cgmanifest.json
filestemplatestrings.json
filesgit checkout
,git restore
, orgit reset --hard HEAD
Problem Context
The copilot setup workflow runs builds that generate files like:
src/Templates/src/cgmanifest.json
templatestrings.json
files in template directoriesThese files are automatically generated during CI builds but were being left in a modified state after the workflow, creating confusion about what should be committed.
Testing
git reset --hard HEAD
successfully cleans up these filesFixes #30112.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.