mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-05-07 04:50:32 -05:00
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:
+19
-14
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user