Use agentic_workflow_url in generated-by footer defaults#23246
Use agentic_workflow_url in generated-by footer defaults#23246
Conversation
…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>
There was a problem hiding this comment.
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
agenticWorkflowUrlfallback uses||and defaults to an empty string whenrunUrlis missing. Using??(nullish coalescing) avoids treating an intentionally provided empty string as “unset”, and returningundefinedinstead of""whenrunUrlis 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.
| 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)"); | ||
| }); |
There was a problem hiding this comment.
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.
…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>
Fixed in 4ac08db. The test |
|
@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>
Done in e6403fe:
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:
If you need me to access, download, or install something from one of these locations, you can either:
|
This comment has been minimized.
This comment has been minimized.
|
Hey One issue to address before this is ready for full review:
Please extract the unrelated test change into a separate PR so this one can be reviewed cleanly.
|
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>
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
{agentic_workflow_url}placeholder — auto-computed as{run_url}/agentic_workflow; available in all footer template contexts (FooterContext,WorkflowRecompileContext,AgentFailureContext){agentic_workflow_url}instead of{run_url}:getFooterMessagegetFooterWorkflowRecompileMessage/getFooterWorkflowRecompileCommentMessagegetFooterAgentFailureIssueMessage/getFooterAgentFailureCommentMessage{run_url}preserved — still available for custom templates viaGH_AW_SAFE_OUTPUT_MESSAGESExample default footer output (before → after):
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/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/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.