From 0b233241ca1d0bbf783d90d587ceb7506a36a8b6 Mon Sep 17 00:00:00 2001 From: Dries Peeters Date: Fri, 19 Sep 2025 11:35:15 +0200 Subject: [PATCH] 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. --- .github/workflows/ci.yml | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a3b3be..be14a68 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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({