Skip to content

Commit b8efd46

Browse files
CopilotAArnott
andcommitted
Update documentation to mention GitHub Copilot auto-detection
Co-authored-by: AArnott <[email protected]>
1 parent aeb45f6 commit b8efd46

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docfx/docs/shallow-cloning-agents.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@ A few caveats with this:
1515

1616
## GitHub Copilot Coding Agent
1717

18-
To configure the Copilot Coding Agent to set this environment variable, follow these steps to set environment variables for the `copilot` environment:
18+
**As of Nerdbank.GitVersioning v3.9, the git engine is automatically disabled when running under GitHub Copilot**, eliminating the need for manual configuration in most cases.
19+
20+
Specifically, when the `GITHUB_ACTOR` environment variable is set to `copilot-swe-agent[bot]` and the `NBGV_GitEngine` environment variable is **not** set, Nerdbank.GitVersioning automatically behaves as if `NBGV_GitEngine=Disabled`. This ensures that GitHub Copilot runs succeed without any additional setup.
21+
22+
If you need to override this behavior for any reason, you can explicitly set the `NBGV_GitEngine` environment variable to your desired value, which will take precedence over the automatic GitHub Copilot detection.
23+
24+
### Manual configuration (optional)
25+
26+
If automatic detection doesn't work for your scenario, you can manually configure the Copilot Coding Agent to set the environment variable by following these steps to set environment variables for the `copilot` environment:
1927

2028
1. Navigate to your GitHub repo's Settings tab.
2129
1. Select Environments from the list on the left.

0 commit comments

Comments
 (0)