Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions actions/setup/js/handle_agent_failure.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ When prompted, instruct the agent to debug this workflow failure.`;
expect(failureIssueCreateCall.body).toContain("<!-- gh-aw-expires:");
expect(failureIssueCreateCall.body).not.toContain("## Root Cause");
expect(failureIssueCreateCall.body).not.toContain("## Expected Outcome");
expect(failureIssueCreateCall.body).toContain("Generated from Test Workflow");
expect(failureIssueCreateCall.body).toContain("Generated from [Test Workflow](https://github.com/test-owner/test-repo/actions/runs/123)");

expect(mockCore.info).toHaveBeenCalledWith(expect.stringContaining("Created new issue #42"));
});
Expand Down Expand Up @@ -492,7 +492,7 @@ When prompted, instruct the agent to debug this workflow failure.`;
expect(commentCall.body).toContain("Agent job [123]");
expect(commentCall.body).toContain("https://github.com/test-owner/test-repo/actions/runs/123");
expect(commentCall.body).not.toContain("```bash");
expect(commentCall.body).toContain("Generated from Test Workflow");
expect(commentCall.body).toContain("Generated from [Test Workflow](https://github.com/test-owner/test-repo/actions/runs/123)");

expect(mockCore.info).toHaveBeenCalledWith(expect.stringContaining("Added comment to existing issue #10"));
});
Expand Down
8 changes: 4 additions & 4 deletions actions/setup/js/messages_footer.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ function getFooterAgentFailureIssueMessage(ctx) {
// Create context with both camelCase and snake_case keys
const templateContext = toSnakeCase(ctx);

// Default footer template
const defaultFooter = "> Generated from {workflow_name}";
// Default footer template with link to workflow run
const defaultFooter = "> Generated from [{workflow_name}]({run_url})";

// Use custom agent failure issue footer if configured, otherwise use default footer
return messages?.agentFailureIssue ? renderTemplate(messages.agentFailureIssue, templateContext) : renderTemplate(defaultFooter, templateContext);
Expand All @@ -147,8 +147,8 @@ function getFooterAgentFailureCommentMessage(ctx) {
// Create context with both camelCase and snake_case keys
const templateContext = toSnakeCase(ctx);

// Default footer template
const defaultFooter = "> Generated from {workflow_name}";
// Default footer template with link to workflow run
const defaultFooter = "> Generated from [{workflow_name}]({run_url})";

// Use custom agent failure comment footer if configured, otherwise use default footer
return messages?.agentFailureComment ? renderTemplate(messages.agentFailureComment, templateContext) : renderTemplate(defaultFooter, templateContext);
Expand Down