Skip to content

Commit 4f27b11

Browse files
authored
Update agent-docusarus-dev.yml
1 parent c876816 commit 4f27b11

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

.github/workflows/agent-docusarus-dev.yml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,23 +135,33 @@ EOF
135135
}
136136
}
137137
138-
// Escape backticks that might break template literal
139-
const safeContent = reviewContent.replace(/`/g, '\\`');
140-
141-
const summary = `## 🤖 Claude Docusaurus Review
142-
143-
${safeContent}
144-
145-
---
146-
147-
<sub>Automated review by Claude Code</sub>`;
138+
// Use string concatenation instead of template literals to avoid syntax errors
139+
const summary = '## 🤖 Claude Docusaurus Review\n\n' +
140+
reviewContent +
141+
'\n\n---\n\n<sub>Automated review by Claude Code</sub>';
148142
149143
await github.rest.issues.createComment({
150144
issue_number: context.issue.number,
151145
owner: context.repo.owner,
152146
repo: context.repo.repo,
153147
body: summary
154148
});
149+
150+
console.log('Review posted successfully');
155151
} catch (error) {
156152
console.error('Error processing review:', error);
153+
154+
// Post error comment to notify about the failure
155+
try {
156+
await github.rest.issues.createComment({
157+
issue_number: context.issue.number,
158+
owner: context.repo.owner,
159+
repo: context.repo.repo,
160+
body: '## ❌ Claude Review Error\n\nFailed to process the review output. Please check the action logs for details.'
161+
});
162+
} catch (commentError) {
163+
console.error('Failed to post error comment:', commentError);
164+
}
165+
166+
core.setFailed(error.message);
157167
}

0 commit comments

Comments
 (0)