feat: set GITHUB_COPILOT_INTEGRATION_ID env var for Copilot CLI#25153
Merged
feat: set GITHUB_COPILOT_INTEGRATION_ID env var for Copilot CLI#25153
Conversation
When running the Copilot CLI in agentic workflows, set GITHUB_COPILOT_INTEGRATION_ID=agentic-workflows so the CLI knows it is being invoked by gh-aw. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Sets GITHUB_COPILOT_INTEGRATION_ID=agentic-workflows when invoking the Copilot CLI from gh-aw generated workflows so the Copilot CLI can identify the calling integration.
Changes:
- Add constants for the Copilot CLI integration ID env var name/value.
- Set the integration ID env var during Copilot engine execution step generation.
- Regenerate workflow lock files and golden fixtures to include the new env var.
Show a summary per file
| File | Description |
|---|---|
| pkg/constants/engine_constants.go | Adds constants for GITHUB_COPILOT_INTEGRATION_ID name/value. |
| pkg/workflow/copilot_engine_execution.go | Injects the integration ID env var into Copilot execution step env. |
| pkg/workflow/testdata/TestWasmGolden_CompileFixtures/basic-copilot.golden | Updates compiled workflow golden to include integration ID env var. |
| pkg/workflow/testdata/TestWasmGolden_CompileFixtures/with-imports.golden | Updates compiled workflow golden to include integration ID env var. |
| .github/workflows/workflow-skill-extractor.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/workflow-normalizer.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/workflow-health-manager.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/workflow-generator.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/weekly-safe-outputs-spec-review.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/weekly-issue-summary.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/weekly-editors-health-check.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/weekly-blog-post-writer.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/video-analyzer.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/update-astro.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/ubuntu-image-analyzer.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/tidy.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/test-workflow.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/test-project-url-default.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/test-dispatcher.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/terminal-stylist.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/technical-doc-writer.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/super-linter.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/sub-issue-closer.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/stale-repo-identifier.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/smoke-workflow-call.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/smoke-workflow-call-with-inputs.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/smoke-update-cross-repo-pr.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/smoke-test-tools.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/smoke-temporary-id.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/smoke-service-ports.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/smoke-project.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/smoke-multi-pr.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/smoke-create-cross-repo-pr.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/smoke-copilot.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/smoke-copilot-arm.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/slide-deck-maintainer.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/security-review.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/security-compliance.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/research.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/repository-quality-improver.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/repo-tree-map.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/repo-audit-analyzer.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/release.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/refiner.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/q.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/python-data-charts.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/pr-triage-agent.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/pr-nitpick-reviewer.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/portfolio-analyst.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/poem-bot.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/plan.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/pdf-summary.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/org-health-report.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/notion-issue-summary.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/metrics-collector.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/mergefest.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/mcp-inspector.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/layout-spec-maintainer.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/jsweep.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/issue-triage-agent.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/issue-monster.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/gpclean.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/glossary-maintainer.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/github-remote-mcp-auth-test.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/functional-pragmatist.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/firewall.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/firewall-escape.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/example-permissions-warning.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/draft-pr-cleanup.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/docs-noob-tester.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/discussion-task-miner.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/dictation-prompt.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/dev.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/dev-hawk.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/dependabot-go-checker.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/dependabot-burner.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/delight.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/dead-code-remover.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/daily-workflow-updater.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/daily-testify-uber-super-expert.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/daily-team-status.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/daily-syntax-error-quality.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/daily-semgrep-scan.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/daily-secrets-analysis.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/daily-safe-output-integrator.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/daily-repo-chronicle.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/daily-regulatory.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/daily-performance-summary.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/daily-news.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/daily-mcp-concurrency-analysis.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/daily-malicious-code-scan.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/daily-issues-report.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/daily-integrity-analysis.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/daily-firewall-report.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/daily-file-diet.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/daily-compiler-quality.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/daily-community-attribution.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/daily-cli-tools-tester.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/daily-cli-performance.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/daily-assign-issue-to-user.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/daily-architecture-diagram.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/craft.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/copilot-token-optimizer.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/copilot-token-audit.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/copilot-pr-prompt-analysis.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/copilot-pr-nlp-analysis.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/copilot-pr-merged-report.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/copilot-cli-deep-research.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/contribution-check.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/constraint-solving-potd.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/code-simplifier.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/code-scanning-fixer.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/cli-consistency-checker.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/ci-coach.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/breaking-change-checker.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/brave.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/bot-detection.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/auto-triage-issues.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/artifacts-summary.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/archie.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/agentic-observability-kit.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/agent-persona-explorer.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/agent-performance-analyzer.lock.yml | Regenerated locked workflow to include integration ID env var. |
| .github/workflows/ace-editor.lock.yml | Regenerated locked workflow to include integration ID env var. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 124/124 changed files
- Comments generated: 1
Comment on lines
275
to
279
| // Tag the step as a GitHub AW agentic execution for discoverability by agents | ||
| env["GITHUB_AW"] = "true" | ||
| // Identify the calling integration to the Copilot CLI | ||
| env[constants.CopilotCLIIntegrationIDEnvVar] = constants.CopilotCLIIntegrationIDValue | ||
| // Indicate the phase: "agent" for the main run, "detection" for threat detection |
There was a problem hiding this comment.
GITHUB_COPILOT_INTEGRATION_ID is set here, but later maps.Copy(env, workflowData.EngineConfig.Env) and maps.Copy(env, agentConfig.Env) can overwrite it if callers provide the same key. If the intent is to always identify gh-aw to the Copilot CLI, consider setting this env var after applying custom env maps (or only setting it when absent, depending on desired precedence).
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
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.
When running the Copilot CLI in agentic workflows, set
GITHUB_COPILOT_INTEGRATION_ID=agentic-workflowsso the CLI knows it is being invoked by gh-aw. We've received our integrator ID from CAPI, and so this should be ready to ship.See https://github.com/github/agentic-workflows/issues/34
Rebased from #24164 onto latest main.
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com