From 7a4a9b4c272a3480206745dd99422c4de35ee068 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 6 Jan 2025 01:04:45 +0300 Subject: [PATCH] update --- .github/workflows/ai_bot.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ai_bot.yml b/.github/workflows/ai_bot.yml index 98b22c3..9b064ac 100644 --- a/.github/workflows/ai_bot.yml +++ b/.github/workflows/ai_bot.yml @@ -209,8 +209,9 @@ jobs: // Prepare CSV content console.log('Preparing CSV content...'); - const csvContent = Buffer.from(csvFile.content, 'base64').toString('utf-8') + - `\n"${actName.replace(/"/g, '""')}","${newPrompt.replace(/"/g, '""')}"`; + let csvContent = Buffer.from(csvFile.content, 'base64').toString('utf-8'); + if (!csvContent.endsWith('\n')) csvContent += '\n'; + csvContent += `"${actName.replace(/"/g, '""')}","${newPrompt.replace(/"/g, '""')}"`; // Create new branch const branchName = `prompt/${actName.toLowerCase().replace(/[^a-z0-9]+/g, '-')}`;