Skip to content

Use agentic_workflow_url in generated-by footer defaults#23246

Merged
pelikhan merged 4 commits intomainfrom
copilot/update-generated-by-footer
Mar 27, 2026
Merged

Use agentic_workflow_url in generated-by footer defaults#23246
pelikhan merged 4 commits intomainfrom
copilot/update-generated-by-footer

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 27, 2026

GitHub.com added a new route (/actions/runs/{id}/agentic_workflow) that links directly to the agentic workflow file view for a run. Footer defaults previously linked to the plain run URL, missing this more specific destination.

Changes

  • New {agentic_workflow_url} placeholder — auto-computed as {run_url}/agentic_workflow; available in all footer template contexts (FooterContext, WorkflowRecompileContext, AgentFailureContext)
  • Default templates updated — all five "Generated by" / "Updated by" defaults now link to {agentic_workflow_url} instead of {run_url}:
    • getFooterMessage
    • getFooterWorkflowRecompileMessage / getFooterWorkflowRecompileCommentMessage
    • getFooterAgentFailureIssueMessage / getFooterAgentFailureCommentMessage
  • {run_url} preserved — still available for custom templates via GH_AW_SAFE_OUTPUT_MESSAGES

Example default footer output (before → after):

# Before
> Generated by [My Workflow](https://github.com/org/repo/actions/runs/123)

# After
> Generated by [My Workflow](https://github.com/org/repo/actions/runs/123/agentic_workflow)

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/repos/github/gh-aw/contents/.github%2Fworkflows%2Faudit-workflows.md
    • Triggering command: /opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node --experimental-import-meta-resolve --require /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/suppress-warnings.cjs --conditions node --conditions development /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/dist/workers/forks.js (http block)
  • invalid.example.invalid
    • Triggering command: /usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin https://invalid.example.invalid/nonexistent-repo.git git conf�� user.name lure tions/setup/js/node_modules/.bin/git -M main /usr/sbin/git git init�� --bare --initial-branch=main k/gh-aw/gh-aw/actions/setup/js/node_modules/.bin/git '/tmp/bare-incregit '/tmp/bare-increadd cal/bin/git git (dns block)

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


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…footer

Add new {agentic_workflow_url} template variable computed as {run_url}/agentic_workflow
to support the new GitHub.com route for direct links to the agentic workflow file view.

Update all default footer templates to use {agentic_workflow_url} instead of {run_url}:
- getFooterMessage
- getFooterWorkflowRecompileMessage
- getFooterWorkflowRecompileCommentMessage
- getFooterAgentFailureIssueMessage
- getFooterAgentFailureCommentMessage

The {run_url} placeholder remains available for custom templates.

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/bb0cdcac-ba69-4ff1-9da0-a11d1728345b

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update generated by footer to include direct link to agentic workflow URL Use agentic_workflow_url in generated-by footer defaults Mar 27, 2026
Copilot AI requested a review from pelikhan March 27, 2026 14:21
@pelikhan pelikhan marked this pull request as ready for review March 27, 2026 14:39
Copilot AI review requested due to automatic review settings March 27, 2026 14:39
@pelikhan
Copy link
Copy Markdown
Collaborator

@mnkiefer

@pelikhan
Copy link
Copy Markdown
Collaborator

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

Updates default “Generated by/Updated by” footer links to point at the new GitHub route that opens the agentic workflow file view for a run.

Changes:

  • Adds an {agentic_workflow_url} placeholder (computed as {run_url}/agentic_workflow) to footer template contexts.
  • Updates default footer templates to use {agentic_workflow_url} instead of {run_url}.
  • Updates unit tests and documentation to reflect the new default link target.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
actions/setup/js/messages_footer.cjs Computes agentic_workflow_url and switches default footer templates to the new route.
actions/setup/js/messages.test.cjs Updates expectations for the default footer link destination.
actions/setup/js/messages.cjs Documents the new {agentic_workflow_url} placeholder in the barrel module comment.
Comments suppressed due to low confidence (1)

actions/setup/js/messages_footer.cjs:41

  • The agenticWorkflowUrl fallback uses || and defaults to an empty string when runUrl is missing. Using ?? (nullish coalescing) avoids treating an intentionally provided empty string as “unset”, and returning undefined instead of "" when runUrl is absent keeps {agentic_workflow_url} unreplaced (instead of generating a () Markdown link), making misconfigured contexts easier to detect.
  const agenticWorkflowUrl = ctx.agenticWorkflowUrl || (ctx.runUrl ? `${ctx.runUrl}/agentic_workflow` : "");


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

Comment on lines 160 to 169
it("should return default footer when no custom config", async () => {
const { getFooterMessage } = await import("./messages.cjs");

const result = getFooterMessage({
workflowName: "Test Workflow",
runUrl: "https://github.com/test/repo/actions/runs/123",
});

expect(result).toBe("> Generated by [Test Workflow](https://github.com/test/repo/actions/runs/123)");
expect(result).toBe("> Generated by [Test Workflow](https://github.com/test/repo/actions/runs/123/agentic_workflow)");
});
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

New behavior adds an {agentic_workflow_url} placeholder, but the tests only assert the updated default footer string. Add unit coverage that (1) a custom template can reference {agentic_workflow_url} and gets the computed value, and (2) an explicit agenticWorkflowUrl in the context overrides the computed {run_url}/agentic_workflow value.

Copilot uses AI. Check for mistakes.
…include skipped result

The test expected 'if: always() && needs.detection.result == "success"' but the
compiler now generates 'if: always() && (needs.detection.result == "success" ||
needs.detection.result == "skipped")' since the fix in #23185.

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/01c4614b-2dd3-453a-94c1-59a5b1a91da4

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 27, 2026

@copilot fix https://github.com/github/gh-aw/actions/runs/23651723351/job/68898088721

Fixed in 4ac08db. The test TestCacheMemoryWithThreatDetection was checking for if: always() && needs.detection.result == 'success' but the compiler (since the #23185 fix) now generates if: always() && (needs.detection.result == 'success' || needs.detection.result == 'skipped'). Updated the expected string to match.

@mnkiefer
Copy link
Copy Markdown
Contributor

@copilot apply changes based on the comments in this thread

- Add agenticWorkflowUrl pre-computation to getFooterInstallMessage
  for consistency with the other footer functions
- Update messages_core.cjs doc comment to include {agentic_workflow_url}
  as the authoritative placeholder list
- Update messages.cjs barrel-file to reference messages_core.cjs
  instead of duplicating the placeholder list
- Add unit tests for {agentic_workflow_url} in custom templates
  and explicit agenticWorkflowUrl context override

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/912f0e19-ceac-4fda-9ad3-e2cce70317b9

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 27, 2026

@copilot apply changes based on the comments in this thread

Done in e6403fe:

  1. getFooterInstallMessage: now pre-computes agenticWorkflowUrl (same pattern as all other footer functions), so {agentic_workflow_url} is available in custom footerInstall templates too.
  2. messages_core.cjs: added {agentic_workflow_url} to the "Supported placeholders" doc comment (the authoritative list).
  3. messages.cjs barrel file: replaced the duplicated placeholder list with a single pointer to messages_core.cjs.
  4. Tests: added two new cases — custom template referencing {agentic_workflow_url} gets the computed value, and an explicit agenticWorkflowUrl in context overrides the computed {run_url}/agentic_workflow.

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 cfg 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linu4 /usr/bin/git get --local 64/pkg/tool/linu--show-toplevel git (http block)
  • https://api.github.com/orgs/test-owner/actions/secrets
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name (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 --show-toplevel x_amd64/vet /usr/bin/git (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 -bool -buildtags /usr/bin/git -errorsas -ifaceassert -nilfunc git rev-�� --show-toplevel -tests /usr/bin/infocmp (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 plorer.md --get 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha Safe: ${{ github.actor }}, Unsafe: ${{ secrets.TOKEN }} x_amd64/vet /usr/bin/git submodules | heagit (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet /usr/bin/git se 971895/b235/vet.rev-parse ache/go/1.25.0/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.0/x64/pkg/tool/linu1 /usr/bin/git REDACTED (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 /tmp/file-tracker-test52889411/existing.md (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha ets.TOKEN }} rev-parse /usr/bin/git d -n 10 (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet /usr/bin/git se 971895/b053/vet.rev-parse cfg git rev-�� --show-toplevel ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet /usr/bin/git se 971895/b249/vet.rev-parse ache/go/1.25.0/x--show-toplevel git (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 (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -c=4 -nolocalimports -importcfg /tmp/go-build686971895/b434/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/pkg/repoutil/repoutil.go /home/REDACTED/work/gh-aw/gh-aw/pkg/repoutil/repoutil_test.go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha 01 (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 (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 --show-toplevel (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 -unreachable=false /tmp/go-build686971895/b108/vet.cfg (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v0.1.2
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq .object.sha -bool -buildtags /opt/hostedtoolcache/node/24.14.0/x64/bin/node -errorsas -ifaceassert -nilfunc node /tmp�� /home/REDACTED/work/gh-aw/gh-aw/.github/workflows/ace-editor.md -tests /usr/bin/git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha 2653-13182/test-2865814019 /tmp/go-build686971895/b087/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha runs/20260327-162653-13182/test-1783510630/.github/workflows /tmp/go-build686971895/b127/vet.cfg _.a l (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 (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 (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 (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 assword=$GITHUB_TOKEN&#34;; }; f get 64/pkg/tool/linux_amd64/vet (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 assword=$GITHUB_TOKEN&#34;; }; f store 64/pkg/tool/linux_amd64/vet (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 (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 (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path (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 (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v0.47.4
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq .object.sha --show-toplevel x_amd64/vet /usr/bin/git (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 ty-test.md cfg 64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v2.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v3.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha (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 _.a r 64/pkg/tool/linu-importcfg (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 HooksPath (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 64/bin/git (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build686971895/b403/cli.test /tmp/go-build686971895/b403/cli.test -test.testlogfile=/tmp/go-build686971895/b403/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 (http block)

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

Copilot AI requested a review from mnkiefer March 27, 2026 16:29
@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

Hey @Copilot 👋 — nice work on improving the footer links to use the new /agentic_workflow route! The implementation is clean, well-documented, and the test coverage for the new {agentic_workflow_url} placeholder is thorough.

One issue to address before this is ready for full review:

  • Unfocused diffpkg/workflow/cache_memory_threat_detection_test.go is included in this PR but is unrelated to the footer URL change. That file updates a Go test condition for the update_cache_memory job (adding || needs.detection.result == 'skipped'), which belongs in a separate PR with its own context and rationale.

Please extract the unrelated test change into a separate PR so this one can be reviewed cleanly.

Generated by Contribution Check ·

@pelikhan pelikhan merged commit da57c3f into main Mar 27, 2026
55 checks passed
@pelikhan pelikhan deleted the copilot/update-generated-by-footer branch March 27, 2026 18:02
github-actions bot added a commit that referenced this pull request Mar 27, 2026
Add {agentic_workflow_url} to the custom messages variables list in
safe-outputs.md and update the footer customization example in
footers.md to use the new variable, noting that it links to the
agentic workflow file view (run_url/agentic_workflow).

Follows PR #23246 which changed the default footer link from run_url
to agentic_workflow_url across all generated-by/updated-by templates.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants