Skip to content

feat: expand copilot as a bot alias to all GitHub Copilot bot identities#34026

Merged
pelikhan merged 3 commits into
mainfrom
copilot/map-copilot-bot-name
May 22, 2026
Merged

feat: expand copilot as a bot alias to all GitHub Copilot bot identities#34026
pelikhan merged 3 commits into
mainfrom
copilot/map-copilot-bot-name

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 22, 2026

Users writing bots: [copilot] needed to know and enumerate all Copilot actor identities manually. This adds compile-time alias expansion so copilot covers the full set of GitHub Copilot bots — the coding agent (copilot-swe-agent[bot]), the interactive @Copilot bot, and the base copilot[bot] form.

Changes

  • pkg/workflow/bot_aliases.go — new file defining copilotBotNames and expandBotNames, which replaces any "copilot" entry with the three canonical identities
  • pkg/workflow/compiler_orchestrator_workflow.go — wraps both mergeBots and mergeSkipBots with expandBotNames so the alias works in both bots: and skip-bots:
  • pkg/workflow/bot_aliases_test.go — unit tests for expandBotNames covering nil passthrough, deduplication, and mixed-list cases
  • pkg/workflow/bots_test.go — end-to-end compilation test verifying bots: [copilot] produces GH_AW_ALLOWED_BOTS: "copilot-swe-agent,Copilot,copilot"

Example

on:
  pull_request:
    types: [opened]
  bots: [copilot]   # expands to: copilot-swe-agent, Copilot, copilot

Compiled output:

GH_AW_ALLOWED_BOTS: "copilot-swe-agent,Copilot,copilot"

Dedup-safe: explicitly listing copilot-swe-agent alongside copilot produces no duplicate entries.

Copilot AI and others added 3 commits May 22, 2026 14:06
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title feat: map copilot bot name alias to all GitHub Copilot bot identities feat: expand copilot as a bot alias to all GitHub Copilot bot identities May 22, 2026
Copilot AI requested a review from pelikhan May 22, 2026 14:17
@pelikhan pelikhan marked this pull request as ready for review May 22, 2026 14:18
Copilot AI review requested due to automatic review settings May 22, 2026 14:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for using copilot as a shorthand bot alias in workflow frontmatter so authors don’t need to enumerate all GitHub Copilot actor identities.

Changes:

  • Introduces expandBotNames to expand "copilot" into copilot-swe-agent, Copilot, and copilot, with deduplication.
  • Applies alias expansion during compilation for both on.bots and on.skip-bots.
  • Adds unit + end-to-end tests for alias expansion behavior and compiled output.
Show a summary per file
File Description
pkg/workflow/bot_aliases.go Adds the copilot alias expansion helper and canonical Copilot bot name list.
pkg/workflow/compiler_orchestrator_workflow.go Applies expandBotNames to merged bots and skip-bots during workflow extraction.
pkg/workflow/bot_aliases_test.go Unit tests for expandBotNames (nil/empty passthrough, dedup, mixed lists).
pkg/workflow/bots_test.go End-to-end compilation test asserting bots: [copilot] expands into GH_AW_ALLOWED_BOTS.
.github/workflows/release.lock.yml Updates the pinned docker/metadata-action reference in the generated release lockfile.
.github/aw/actions-lock.json Adds a new pinned entry for docker/metadata-action@v6.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 6/6 changed files
  • Comments generated: 2

Comment on lines 1 to +2
# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"6a6bd39e2339b2b176862a0fceb3dc70c2440fe79b8689f4e476134a57bed33a","strict":true,"agent_id":"copilot"}
# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GH_AW_OTEL_GRAFANA_AUTHORIZATION","GH_AW_OTEL_GRAFANA_ENDPOINT","GH_AW_OTEL_SENTRY_AUTHORIZATION","GH_AW_OTEL_SENTRY_ENDPOINT","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-go","sha":"4a3601121dd01d1626a1e23e37211e3254c1c06c","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"anchore/sbom-action","sha":"e22c389904149dbc22b58101806040fa8d37a610","version":"v0.24.0"},{"repo":"docker/build-push-action","sha":"bcafcacb16a39f128d818304e6c9c0c18556b85f","version":"v7.1.0"},{"repo":"docker/login-action","sha":"4907a6ddec9925e35a0a9e82d7399ccc52663121","version":"v4.1.0"},{"repo":"docker/metadata-action","sha":"030e881283bb7a6894de51c315a6bfe6a94e05cf","version":"v6.0.0 (source v6)"},{"repo":"docker/setup-buildx-action","sha":"4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd","version":"v4.0.0 (source v4)"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.51"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.51"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.51"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.17"},{"image":"ghcr.io/github/github-mcp-server:v1.0.4"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]}
# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GH_AW_OTEL_GRAFANA_AUTHORIZATION","GH_AW_OTEL_GRAFANA_ENDPOINT","GH_AW_OTEL_SENTRY_AUTHORIZATION","GH_AW_OTEL_SENTRY_ENDPOINT","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-go","sha":"4a3601121dd01d1626a1e23e37211e3254c1c06c","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"anchore/sbom-action","sha":"e22c389904149dbc22b58101806040fa8d37a610","version":"v0.24.0"},{"repo":"docker/build-push-action","sha":"bcafcacb16a39f128d818304e6c9c0c18556b85f","version":"v7.1.0"},{"repo":"docker/login-action","sha":"4907a6ddec9925e35a0a9e82d7399ccc52663121","version":"v4.1.0"},{"repo":"docker/metadata-action","sha":"80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9","version":"v6"},{"repo":"docker/setup-buildx-action","sha":"4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd","version":"v4.0.0 (source v4)"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.51"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.51"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.51"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.17"},{"image":"ghcr.io/github/github-mcp-server:v1.0.4"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]}
Comment on lines +141 to +145
"docker/metadata-action@v6": {
"repo": "docker/metadata-action",
"version": "v6",
"sha": "80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9"
},
@pelikhan pelikhan merged commit 835f482 into main May 22, 2026
4 checks passed
@pelikhan pelikhan deleted the copilot/map-copilot-bot-name branch May 22, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants