From 1e1332cf84cf9cacdd8dec650ea0b27b577a5a2e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 19 Aug 2026 11:40:57 +0000 Subject: [PATCH 1/6] Initial plan From 89d1d05de310d41c8d31a08c3d03e4457a3acae3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 19 Aug 2026 11:50:48 +0000 Subject: [PATCH 2/6] Fix markdown-safe encoding for related-runs history URLs Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- actions/setup/js/generate_history_link.cjs | 6 ++++-- actions/setup/js/generate_history_link.test.cjs | 13 +++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/actions/setup/js/generate_history_link.cjs b/actions/setup/js/generate_history_link.cjs index eb5700990db..80cdbd2d2bf 100644 --- a/actions/setup/js/generate_history_link.cjs +++ b/actions/setup/js/generate_history_link.cjs @@ -65,11 +65,13 @@ function generateHistoryUrl({ owner, repo, itemType, workflowCallId, workflowId, throw new Error(`Invalid server URL: ${server}`); } })(); - url.searchParams.set("q", queryParts.join(" ")); + const encodedQuery = encodeURIComponent(queryParts.join(" ")).replaceAll("%20", "+"); // Set the type parameter based on itemType for correct GitHub search filtering const searchTypeMap = { issue: "issues", pull_request: "pullrequests", discussion: "discussions", comment: "issues", discussion_comment: "discussions" }; - url.searchParams.set("type", searchTypeMap[itemType] ?? "issues"); + const searchType = searchTypeMap[itemType] ?? "issues"; + + url.search = `q=${encodedQuery}&type=${encodeURIComponent(searchType)}`; return url.toString(); } diff --git a/actions/setup/js/generate_history_link.test.cjs b/actions/setup/js/generate_history_link.test.cjs index 442f7483392..da0b10e371b 100644 --- a/actions/setup/js/generate_history_link.test.cjs +++ b/actions/setup/js/generate_history_link.test.cjs @@ -180,6 +180,19 @@ describe("generate_history_link.cjs", () => { expect(url).toContain("gh-aw-workflow-call-id%3A+caller%2Frepo%2FWorkflowName"); }); + it("should percent-encode both marker delimiter quotes for markdown-safe links", () => { + const url = generateHistoryUrl({ + owner: "elastic", + repo: "docs-eng-team", + itemType: "issue", + workflowCallId: "elastic/docs-eng-team/gh-aw-issue-auto-triage", + serverUrl: "https://github.com", + }); + + expect(url).toContain("%22gh-aw-workflow-call-id%3A+elastic%2Fdocs-eng-team%2Fgh-aw-issue-auto-triage%22"); + expect(url).not.toContain('+"gh-aw-workflow-call-id'); + }); + it("should include workflow-id marker in search query when used", () => { const url = generateHistoryUrl({ owner: "testowner", From f3c8ec522f93b68cdba5d52d14c04034da6cda64 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 19 Aug 2026 11:52:10 +0000 Subject: [PATCH 3/6] Address review feedback in history URL encoding fix Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- actions/setup/js/generate_history_link.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/setup/js/generate_history_link.cjs b/actions/setup/js/generate_history_link.cjs index 80cdbd2d2bf..a4d3bca5acb 100644 --- a/actions/setup/js/generate_history_link.cjs +++ b/actions/setup/js/generate_history_link.cjs @@ -71,7 +71,7 @@ function generateHistoryUrl({ owner, repo, itemType, workflowCallId, workflowId, const searchTypeMap = { issue: "issues", pull_request: "pullrequests", discussion: "discussions", comment: "issues", discussion_comment: "discussions" }; const searchType = searchTypeMap[itemType] ?? "issues"; - url.search = `q=${encodedQuery}&type=${encodeURIComponent(searchType)}`; + url.search = `q=${encodedQuery}&type=${searchType}`; return url.toString(); } From 0c1e1ca0386c5d81d44fddef39ad6ad739b2b1aa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 19 Aug 2026 12:12:22 +0000 Subject: [PATCH 4/6] Encode RFC3986 chars in history query and add paren regression test Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com> --- actions/setup/js/generate_history_link.cjs | 4 +++- actions/setup/js/generate_history_link.test.cjs | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/actions/setup/js/generate_history_link.cjs b/actions/setup/js/generate_history_link.cjs index a4d3bca5acb..1e6a5df086d 100644 --- a/actions/setup/js/generate_history_link.cjs +++ b/actions/setup/js/generate_history_link.cjs @@ -65,7 +65,9 @@ function generateHistoryUrl({ owner, repo, itemType, workflowCallId, workflowId, throw new Error(`Invalid server URL: ${server}`); } })(); - const encodedQuery = encodeURIComponent(queryParts.join(" ")).replaceAll("%20", "+"); + const encodedQuery = encodeURIComponent(queryParts.join(" ")) + .replace(/[!'()*]/g, char => `%${char.charCodeAt(0).toString(16).toUpperCase()}`) + .replaceAll("%20", "+"); // Set the type parameter based on itemType for correct GitHub search filtering const searchTypeMap = { issue: "issues", pull_request: "pullrequests", discussion: "discussions", comment: "issues", discussion_comment: "discussions" }; diff --git a/actions/setup/js/generate_history_link.test.cjs b/actions/setup/js/generate_history_link.test.cjs index da0b10e371b..420fc856257 100644 --- a/actions/setup/js/generate_history_link.test.cjs +++ b/actions/setup/js/generate_history_link.test.cjs @@ -193,6 +193,19 @@ describe("generate_history_link.cjs", () => { expect(url).not.toContain('+"gh-aw-workflow-call-id'); }); + it("should percent-encode marker parentheses to preserve markdown-safe link targets", () => { + const url = generateHistoryUrl({ + owner: "elastic", + repo: "docs-eng-team", + itemType: "issue", + workflowId: "triage(workflow)", + serverUrl: "https://github.com", + }); + + expect(url).toContain("gh-aw-workflow-id%3A+triage%28workflow%29"); + expect(url).not.toContain("triage(workflow)"); + }); + it("should include workflow-id marker in search query when used", () => { const url = generateHistoryUrl({ owner: "testowner", From 9da10e78bc683cfef35abe82c415b15082e218fb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 20 Aug 2026 02:06:17 +0000 Subject: [PATCH 5/6] chore: start follow-up for merge main and js lint Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/skills/agentic-workflows/SKILL.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/skills/agentic-workflows/SKILL.md b/.github/skills/agentic-workflows/SKILL.md index d0c9af823a8..3af44da06f2 100644 --- a/.github/skills/agentic-workflows/SKILL.md +++ b/.github/skills/agentic-workflows/SKILL.md @@ -41,6 +41,7 @@ Load these files from `github/gh-aw` (they are not available locally). - `.github/aw/github-mcp-server-pagination.md` - `.github/aw/github-mcp-server.md` - `.github/aw/instructions.md` +- `.github/aw/jobs.md` - `.github/aw/linter-workflows.md` - `.github/aw/llms.md` - `.github/aw/loop.md` From c55026b0a7dd6840f4a0074351a4887aef1da009 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 20 Aug 2026 03:21:28 +0000 Subject: [PATCH 6/6] test: strengthen quote-encoding regression assertion Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com> --- actions/setup/js/generate_history_link.test.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/setup/js/generate_history_link.test.cjs b/actions/setup/js/generate_history_link.test.cjs index 420fc856257..05cffc6f0c8 100644 --- a/actions/setup/js/generate_history_link.test.cjs +++ b/actions/setup/js/generate_history_link.test.cjs @@ -190,7 +190,7 @@ describe("generate_history_link.cjs", () => { }); expect(url).toContain("%22gh-aw-workflow-call-id%3A+elastic%2Fdocs-eng-team%2Fgh-aw-issue-auto-triage%22"); - expect(url).not.toContain('+"gh-aw-workflow-call-id'); + expect(url).not.toContain('"'); }); it("should percent-encode marker parentheses to preserve markdown-safe link targets", () => {