Skip to content

Use github.workflow_ref instead of github.workflow for caller workflow identifier#19391

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/fix-workflow-id-identifier
Closed

Use github.workflow_ref instead of github.workflow for caller workflow identifier#19391
Copilot wants to merge 2 commits intomainfrom
copilot/fix-workflow-id-identifier

Conversation

Copy link
Contributor

Copilot AI commented Mar 3, 2026

GH_AW_CALLER_WORKFLOW_ID was built from ${{ github.repository }}/${{ github.workflow }}, which resolves to the workflow's display name — not its file-based ID. This causes marker collisions when two workflows share a display name, and breaks close-older-issues deduplication when a workflow is renamed.

Changes

  • Compiler (compiler_safe_outputs_job.go): Replace the expression with ${{ github.workflow_ref }}, which gives the canonical file path reference (e.g. owner/repo/.github/workflows/caller.lock.yml@refs/heads/main) — stable across display name changes and unique per file.
  • Tests: Update expected value in compiler_safe_outputs_job_test.go.
  • JS comments: Update stale inline docs in create_issue.cjs, create_discussion.cjs, and generate_footer.cjs to reflect the new format.
  • Lock files: Recompiled all 165 workflows with the updated compiler.

Before:

GH_AW_CALLER_WORKFLOW_ID: "${{ github.repository }}/${{ github.workflow }}"
# → "owner/repo/My Display Name"

After:

GH_AW_CALLER_WORKFLOW_ID: "${{ github.workflow_ref }}"
# → "owner/repo/.github/workflows/my-workflow.lock.yml@refs/heads/main"

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw 6PZZ9kYBPXDV (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw -pack /home/REDACTED/work/gh-aw/gh-aw/cmd/gh-aw/main.go x_amd64/vet conf�� w/js/**/*.json' --ignore-path --local x_amd64/vet credential.helpe/opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/link (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha test/concurrent-image:v1.0.0 ache/go/1.25.0/x64/pkg/tool/linurev-parse /usr/bin/git --noprofile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --show-toplevel git ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet --show-toplevel git /usr/bin/git ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet rev-�� --show-toplevel git /usr/bin/git --show-toplevel x_amd64/compile /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --show-toplevel git ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet --show-toplevel git /usr/bin/git ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet rev-�� --show-toplevel git /opt/hostedtoolcache/node/24.13.1/x64/bin/node --show-toplevel git /usr/bin/git node (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha 6RuC/fd8SCMXiqIP5BEEq6RuC rev-parse /usr/bin/gh on' --ignore-patgit g 64/pkg/tool/linu--show-toplevel /usr/bin/gh 0322�� :latest 0322981/b398/_testmain.go /usr/bin/git -f owner=github nch,headSha,disp--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha -maxdepth 4 /usr/bin/git d -name bin git rev-�� --show-toplevel ache/go/1.25.0/x64/pkg/tool/linusecurity 64/pkg/tool/linux_amd64/compile -c 4944/b001/workflrev-parse /usr/bin/git 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha /usr/bin/git git 1/x64/bin/node it/ref/tags/v7 git /usr/bin/git git js --show-toplevel git 64/pkg/tool/linux_amd64/compile --show-toplevel infocmp /usr/bin/git 64/pkg/tool/linux_amd64/compile (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha ty-test.md -goversion (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel /opt/hostedtoolc-dwarf=false /usr/bin/git .version=66ebb92git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha /repos/actions/upload-artifact/git/ref/tags/v7 --jq /usr/bin/git 24436360.go --write 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/cgo /usr/bin/git --noprofile (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --get remote.origin.url /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet */*.ts' '**/*.jsgit 4944/b130/vet.cfrev-parse ules/.bin/sh /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -ato�� -bool -buildtags e/git -errorsas -ifaceassert -nilfunc e/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha /tmp/gh-aw-test-ACCEPT rev-parse /usr/bin/git */*.ts' '**/*.jsgit 4944/b124/vet.cfrev-parse g git conf�� user.name Test User ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet */*.json' '!../.git 4944/b235/vet.cfrev-parse r: $owner, name:--show-toplevel ache/go/1.25.0/x64/pkg/tool/linusecurity (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel node /usr/bin/git 2439642033/.githgit --write /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel sh /usr/bin/git ions-build/main.git (http block)
  • https://api.github.com/repos/actions/download-artifact/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v8 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v8 --jq .object.sha --noprofile g r: $owner, name: $name) { hasDiscussionsEnabled } } (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v8 --jq .object.sha --noprofile g 64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha --noprofile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha se 4944/b059/vet.cfowner=github g (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha */*.ts' '**/*.jsremote.origin.url 4944/b063/vet.cfg r: $owner, name: $name) { hasDiscussionsEnabled } } (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha /repos/actions/github-script/git/ref/tags/v8 --jq /usr/bin/git */*.ts' '**/*.jsgit 4944/b063/vet.cfrev-parse r: $owner, name:--show-toplevel git conf�� user.email test@example.com ache/node/24.13.1/x64/bin/node */*.json' '!../.git 4944/b183/vet.cfrev-parse 64/pkg/tool/linu--show-toplevel ache/node/24.13.1/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha --show-toplevel git /usr/bin/git it/ref/tags/v7 /opt/hostedtoolcrev-parse /usr/bin/git git rev-�� --show-toplevel git ache/go/1.25.0/x64/bin/bash --depth 1 /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha --show-toplevel git ache/node/24.13.1/x64/bin/node --show-toplevel gh /usr/bin/git git _inc�� --show-toplevel git ache/node/24.13.1/x64/bin/bash --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha ry=1 rev-parse 0322981/b428/_pkg_.a */*.ts' '**/*.jsgit 4944/b054/vet.cfrev-parse h git init�� (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel erignore /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/node/24.13.1/x64/bin/node cal/bin/bash vars.MY_VAR /opt/hostedtoolcrev-parse /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha --show-toplevel git ache/node/24.13.1/x64/bin/node --show-toplevel git /usr/bin/git git _inc�� --show-toplevel git bin/bash --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha /home/REDACTED/work/gh-aw/gh-aw/.github/workflows config 1/x64/bin/node remote.origin.urgit credential.usernrev-parse DiscussionsEnabl--show-toplevel /usr/bin/gh t-ha�� SameOutput1829909778/001/stability-test.md -f 0322981/b357/vet.cfg -f owner=github -f /usr/bin/gh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha 40\} ature-branch.patch d|TestWorkflowCall --show-toplevel -tests /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel ache/go/1.25.0/xrev-parse /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha --show-toplevel git 1/x64/bin/node --show-toplevel git /usr/bin/git git ance�� -b feature-branch /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha ath ../../../.pr**/*.json (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha npx prettier --write '../../../**/*.json' '!../../../pkg/workflow/js/**/*.json' --ignore-path /home/REDACTED/work/gh-aw/gh-aw/pkg/workflow/importable_tools_test.go x_amd64/link (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha re --log-level=error --global /node (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 on x_amd64/link /../../.prettiergit erignore -nilfunc x_amd64/link -c ithub/workflows -tests /opt/hostedtoolcache/uv/0.10.7/x86_64/sh (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 lcs/doc.go x_amd64/compile -errorsas -ifaceassert -nilfunc x_amd64/compile -c ithub/workflows -tests ash (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 export.go x_amd64/compile -errorsas -ifaceassert -nilfunc x_amd64/compile (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 on x_amd64/vet /../../.prettiergit erignore ed } } x_amd64/vet -c e=false -tests me: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 on rkflow/js/**/*.json /../../.prettiernode erignore -nilfunc sh estl�� ithub/workflows -tests /opt/hostedtoolcache/go/1.25.0/x-nilfunc (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 on x_amd64/vet /../../.prettiergit erignore -nilfunc x_amd64/vet -c ithub/workflows ff50ab776864840fa991ac5b:go.mod /opt/hostedtoolcache/node/24.13.1/x64/bin/sh (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 on x_amd64/vet /../../.prettiergit erignore (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path se 4944/b006/vet.cfowner=github r: $owner, name:-f (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 -ifaceassert -nilfunc x_amd64/vet --no�� --noprofile -tests /opt/hostedtoolcache/node/24.13.-test.short=true (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb --jq .object.sha get --local x_amd64/vet http.https://gitbash (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha ithub/workflows (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha --show-toplevel infocmp 64/bin/node xterm-color x_amd64/vet .cfg git 1/x6�� --show-toplevel /usr/bin/gh /usr/bin/git k/gh-aw/gh-aw/.ggit -f ache/go/1.25.0/x--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha xterm-color git /usr/bin/git --show-toplevel /usr/bin/git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha js/**/*.json' ---errorsas --local 64/pkg/tool/linu-nilfunc user.name (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha github\.repository.*github\.workflow\|github\.workflow.*github\.repository /home/REDACTED/work/gh-aw/gh-aw me: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } --include=*.cjs (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha --show-toplevel git 86_64/node 4129-15259/test-git config .cfg git 1/x6�� --show-toplevel gh /usr/bin/git /repos/astral-shgit --jq ache/go/1.25.0/x--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha --show-toplevel git /usr/bin/git 40\} ster.patch /usr/bin/git git rev-�� --show-toplevel ue && echo "chain-continued" /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion -errorsas -ifaceassert -nilfunc node /opt�� ithub/workflows --write /bin/sh **/*.ts **/*.json ed } } /bin/sh (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo g (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build3370322981/b383/cli.test /tmp/go-build3370322981/b383/cli.test -test.testlogfile=/tmp/go-build3370322981/b383/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name flow\|github\.workflow.*github\.repository (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Make sure that the workflow call is is using the workflow id not the workflow name to generate the identifier.

Review history link generation and compiler generation in go to make sure the workflow id is used.


💡 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.

…R_WORKFLOW_ID

Use `${{ github.workflow_ref }}` (e.g., "owner/repo/.github/workflows/caller.lock.yml@refs/heads/main")
instead of `${{ github.repository }}/${{ github.workflow }}` (which used the workflow display name).

This ensures the workflow call identifier is based on the actual workflow file ID, not the
human-readable display name which can differ and change independently.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix workflow call to use workflow id instead of name Use github.workflow_ref instead of github.workflow for caller workflow identifier Mar 3, 2026
Copy link
Contributor

@pelikhan pelikhan left a comment

Choose a reason for hiding this comment

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

@copilot keep the repo / workflow id identifier but make sure to use workflow_ref instead of workflow name.

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.

2 participants