fix: rewrite JavaScript template literal to avoid syntax errors

- Replace template literal with array.join() approach for comment body
- Eliminates potential encoding issues with template literal backticks
- Improves code readability with explicit line array
- Ensures cross-platform JavaScript compatibility in GitHub Actions

This provides a more robust solution to the 'Invalid or unexpected token'
SyntaxError by avoiding problematic template literal syntax entirely.
This commit is contained in:
Dries Peeters
2025-09-19 11:35:15 +02:00
parent 1f9cee25ef
commit 0b233241ca
+19 -14
View File
@@ -155,21 +155,26 @@ jobs:
repo: context.repo.repo,
});
const botComment = comments.find(comment => comment.user.type === 'Bot' && comment.body.includes('CI Pipeline Status'));
const botComment = comments.find(comment =>
comment.user.type === 'Bot' &&
comment.body.includes('CI Pipeline Status')
);
const commentBody = \`## CI Pipeline Status
**All checks passed!** :white_check_mark:
**Completed Checks:**
- :white_check_mark: Database migration tests (PostgreSQL & SQLite)
- :white_check_mark: Docker build and startup test
- :white_check_mark: Security vulnerability scan
**Ready for review and merge** :rocket:
---
*This comment was automatically generated by the CI pipeline.*\`;
const commentBody = [
'## CI Pipeline Status',
'',
'**All checks passed!** :white_check_mark:',
'',
'**Completed Checks:**',
'- :white_check_mark: Database migration tests (PostgreSQL & SQLite)',
'- :white_check_mark: Docker build and startup test',
'- :white_check_mark: Security vulnerability scan',
'',
'**Ready for review and merge** :rocket:',
'',
'---',
'*This comment was automatically generated by the CI pipeline.*'
].join('\n');
if (botComment) {
await github.rest.issues.updateComment({