Similar to the Dependabot issues the self-hosted GitHub Copilot flow has gaps in functionality at the organization and enterprise management level to set environment variables. As a result it would be ideal of Nerdbank.GitVersioning was smart enough to detect if it is running in a GitHub Copilot context and disable itself.
Some environment variables that our team members have found:
GITHUB_WORKFLOW=Copilot
GITHUB_ACTOR=copilot-swe-agent[bot]
GITHUB_JOB=copilot
There are workarounds such as setting the NBGV_GitEngine variable to Disabled in our different k8s runner scale sets, removing the package from GlobalPackageReference if env var exists, or updating settings per repository.
Thoughts on this one?