Skip to content
Open
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
20 changes: 10 additions & 10 deletions .github/workflows/agent-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,27 +70,27 @@ jobs:
if (outcome === "success") {
commentBody = `Hello @${issuee},

I have successfully fixed the issue! 🎉
I have successfully fixed the issue! 🎉

A Pull Request has been created with the changes:
🔗 **[Pull Request](${prUrl})**
A Pull Request has been created with the changes:
🔗 **[Pull Request](${prUrl})**

**Run ID:** \`${runId}\`
**Message:** ${message}`;
**Run ID:** \`${runId}\`
**Message:** ${message}`;
} else {
commentBody = `Hello @${issuee},

I attempted to fix this issue automatically but encountered a problem.
I attempted to fix this issue automatically but encountered a problem.

**Outcome:** \`${outcome || 'unknown/failed'}\`
**Message:** ${message || 'No additional message was provided.'}
**Outcome:** \`${outcome || 'unknown/failed'}\`
**Message:** ${message || 'No additional message was provided.'}

Please check the GitHub Actions workflow logs for more details.`;
Please check the GitHub Actions workflow logs for more details.`;
}
Comment on lines 71 to 89

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Avoid leaking YAML indentation into the posted comments.

The spaces required to indent the YAML block scalar are preserved inside these template literals. Consequently, the generated comment’s body lines become an indented Markdown code block, so the PR link and bold fields will render incorrectly. Build each body from an array joined with "\n" (or apply a safe dedent helper) so the YAML indentation does not become comment content.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/agent-fix.yml around lines 71 - 89, Update the success and
failure comment-body construction in the workflow to avoid preserving YAML
indentation in posted Markdown. Build each message from unindented line strings
joined with "\n" (or use an existing safe dedent helper), while preserving the
current interpolated values, formatting, and fallback messages.


await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNumber,
body: commentBody
});
});