Include .agents folder in sparse checkout for agent jobs#13901
Include .agents folder in sparse checkout for agent jobs#13901
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot .agent maybe missing, do not check |
| " sparse-checkout: |\n", | ||
| " .github\n", | ||
| " .agents\n", | ||
| " depth: 1\n", |
|
🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation... |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
❌ Changeset Generator failed. Please review the logs for details. |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
The
This is the standard sparse-checkout behavior and doesn't require any additional handling. Is there a specific issue you'd like me to address differently? |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent Container Tool Check
Result: 11/12 tools available ❌ Note: Java version check returned bash output incorrectly but Java is available in the container.
|
|
🤖 Beep boop! The smoke test agent just passed through discussion #13913 like a gentle breeze on a spring day. All systems nominal! ✨ P.S. If discussions could talk, this one would probably say "Hey, nice triage report!" 🎯
|
Smoke Test: ✅ PASS
Run: https://github.com/github/gh-aw/actions/runs/21713400692 cc @pelikhan
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR adds support for checking out the .agents folder alongside the .github folder in agent jobs. This enables workflows to access skills stored in the new .agents location while maintaining the existing functionality for workflow configurations and runtime imports.
Changes:
- Updated sparse checkout configuration to include
.agentsfolder - Modified step naming and documentation to reflect both folders
- Added comprehensive test coverage for the new behavior
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pkg/workflow/compiler_yaml_helpers.go | Modified generateCheckoutGitHubFolder() to include .agents in sparse-checkout configuration, updated function documentation and log messages |
| pkg/workflow/github_folder_checkout_optimization_test.go | Updated test assertions to verify both .github and .agents folders are included in sparse checkout |
| pkg/workflow/compiler_yaml_helpers_test.go | Added new unit test TestGenerateCheckoutGitHubFolder to verify sparse checkout includes both folders |
Comments suppressed due to low confidence (2)
pkg/workflow/compiler_yaml_helpers.go:185
- Inconsistent logger variable usage. This should use
compilerYamlHelpersLoginstead ofcompilerYamlLogto be consistent with the rest of the file. See comment on line 178 for details.
// Skip .github and .agents checkout if an automatic full repository checkout will be added
pkg/workflow/compiler_yaml_helpers.go:192
- Inconsistent logger variable usage. This should use
compilerYamlHelpersLoginstead ofcompilerYamlLogto be consistent with the rest of the file. See comment on line 178 for details.
// For all modes (dev, script, release), checkout .github and .agents folders
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| // Skip .github checkout if custom steps already contain a full repository checkout | ||
| // The full checkout already includes the .github folder, making sparse checkout redundant | ||
| // Skip .github and .agents checkout if custom steps already contain a full repository checkout |
There was a problem hiding this comment.
Inconsistent logger variable usage. This file defines and uses compilerYamlHelpersLog at line 12, and all other functions in this file use that logger (see lines 31, 35, 49, 62). The log statements on lines 178, 185, and 192 should use compilerYamlHelpersLog instead of compilerYamlLog to be consistent with the rest of the file.
This issue also appears in the following locations of the same file:
- line 185
- line 192
Implementation: Checkout .agents folder in agent jobs
Completed
generateCheckoutGitHubFolder()to include.agentsin sparse-checkout.agentscheckout.agentsis checked outChanges Made
Modified
pkg/workflow/compiler_yaml_helpers.go:generateCheckoutGitHubFolder()to include.agentsfolder in sparse-checkout.agentsto the sparse-checkout configurationUpdated Tests:
TestGitHubFolderCheckoutOptimizationto check for new step name.agentsis in sparse-checkout configurationTestGenerateCheckoutGitHubFolderunit testValidation Results
Original prompt
💡 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.