From 1ae78ee2f21c29da9c63db9e6ac9b0818f50c401 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 6 Aug 2026 12:33:02 +0000 Subject: [PATCH 1/2] fix: ensure blank line before footer in PR review body Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/skills/agentic-workflows/SKILL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/skills/agentic-workflows/SKILL.md b/.github/skills/agentic-workflows/SKILL.md index 22e2accc575..995e0a670cc 100644 --- a/.github/skills/agentic-workflows/SKILL.md +++ b/.github/skills/agentic-workflows/SKILL.md @@ -31,6 +31,7 @@ Load these files from `github/gh-aw` (they are not available locally). - `.github/aw/debug-agentic-workflow.md` - `.github/aw/dependabot.md` - `.github/aw/deployment-status.md` +- `.github/aw/designer-mappings.md` - `.github/aw/designer.md` - `.github/aw/evals.md` - `.github/aw/experiments.md` @@ -100,4 +101,3 @@ After loading the matching workflow prompt or skill, follow it directly: - Design long-running multi-agent research workflows: `.github/aw/multi-agent-research.md` When the task involves OTEL, OTLP, traces, observability backends, or telemetry-driven analysis, also read and follow `skills/otel-queries/SKILL.md` after loading the matching workflow prompt or skill. - From 68d31229e8c25466484c809bf7a2d8e7fd407587 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 6 Aug 2026 12:35:24 +0000 Subject: [PATCH 2/2] fix: ensure blank line before footer in PR review body for proper markdown rendering Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- actions/setup/js/pr_review_buffer.cjs | 24 ++++++++-------- actions/setup/js/pr_review_buffer.test.cjs | 33 ++++++++++++++++++++++ 2 files changed, 46 insertions(+), 11 deletions(-) diff --git a/actions/setup/js/pr_review_buffer.cjs b/actions/setup/js/pr_review_buffer.cjs index 56bd1a19fdb..46727258e0d 100644 --- a/actions/setup/js/pr_review_buffer.cjs +++ b/actions/setup/js/pr_review_buffer.cjs @@ -352,17 +352,19 @@ function createReviewBuffer() { // Add footer to review body if we should and we have footer context if (shouldAddFooter && footerContext) { - body += generateFooterWithMessages( - footerContext.workflowName, - footerContext.runUrl, - footerContext.workflowSource, - footerContext.workflowSourceURL, - footerContext.triggeringIssueNumber, - footerContext.triggeringPRNumber, - footerContext.triggeringDiscussionNumber, - undefined, - { skipDetectionCaution: true } - ); + body += + "\n\n" + + generateFooterWithMessages( + footerContext.workflowName, + footerContext.runUrl, + footerContext.workflowSource, + footerContext.workflowSourceURL, + footerContext.triggeringIssueNumber, + footerContext.triggeringPRNumber, + footerContext.triggeringDiscussionNumber, + undefined, + { skipDetectionCaution: true } + ); const callerWorkflowId = process.env.GH_AW_CALLER_WORKFLOW_ID || ""; if (callerWorkflowId) { diff --git a/actions/setup/js/pr_review_buffer.test.cjs b/actions/setup/js/pr_review_buffer.test.cjs index 14099689aae..2655df14f49 100644 --- a/actions/setup/js/pr_review_buffer.test.cjs +++ b/actions/setup/js/pr_review_buffer.test.cjs @@ -833,6 +833,39 @@ describe("pr_review_buffer (factory pattern)", () => { expect(callArgs.body).toContain("test-workflow"); }); + it("should separate body from footer with a blank line for proper markdown rendering", async () => { + buffer.addComment({ path: "test.js", line: 1, body: "comment" }); + buffer.setReviewMetadata("Review body content", "COMMENT"); + buffer.setReviewContext({ + repo: "owner/repo", + repoParts: { owner: "owner", repo: "repo" }, + pullRequestNumber: 42, + pullRequest: { head: { sha: "abc123" } }, + }); + buffer.setFooterContext({ + workflowName: "test-workflow", + runUrl: "https://github.com/owner/repo/actions/runs/123", + workflowSource: "owner/repo/workflows/test.md@v1", + workflowSourceURL: "https://github.com/owner/repo/blob/main/test.md", + }); + + mockGithub.rest.pulls.createReview.mockResolvedValue({ + data: { + id: 403, + html_url: "https://github.com/owner/repo/pull/42#pullrequestreview-403", + }, + }); + + const result = await buffer.submitReview(); + + expect(result.success).toBe(true); + const callArgs = mockGithub.rest.pulls.createReview.mock.calls[0][0]; + // The footer blockquote must be preceded by at least one blank line + // so Markdown parses the "> Generated by" quote section correctly. + expect(callArgs.body).toMatch(/\n\n> /); + expect(callArgs.body).not.toMatch(/[^\n]\n> /); + }); + it("should retry with COMMENT when APPROVE is rejected on own PR", async () => { buffer.addComment({ path: "test.js", line: 1, body: "comment" }); buffer.setReviewMetadata("LGTM", "APPROVE");