From 095127b2fb9c872ac415504745e416ba9f18fca3 Mon Sep 17 00:00:00 2001
From: Amit Levy <amit.levy@appsflyer.com>
Date: Thu, 16 May 2024 11:10:26 +0300
Subject: [PATCH] Added capabilities to pluginQA

---
 .github/workflows/pluginQA.yml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/pluginQA.yml b/.github/workflows/pluginQA.yml
index b96b17b..686b2ec 100644
--- a/.github/workflows/pluginQA.yml
+++ b/.github/workflows/pluginQA.yml
@@ -48,12 +48,14 @@ jobs:
 
       - name: Extract CHANGELOG latest changes
         run: |
-          PACKAGE_CHANGES=$(awk -v ver="$PACKAGE_VERSION" '
+          PACKAGE_CHANGES=$(awk -v ver="$PACKAGE_VERSION" -v ORS=', ' '
           BEGIN { printing = 0; }
           printing && /^## / { exit; }
           $0 ~ "^## " ver { printing = 1; next; }
-          printing { sub(/^-\s*/, ""); print; }
+          printing && NF { sub(/^-\s*/, ""); print; }
+          END { printf "\n" } # To ensure it ends with a newline
           ' CHANGELOG.md)
+          PACKAGE_CHANGES="${PACKAGE_CHANGES%', '}"
           echo "PACKAGE_CHANGES<<EOF" >> $GITHUB_ENV
           echo "$PACKAGE_CHANGES" >> $GITHUB_ENV
           echo "EOF" >> $GITHUB_ENV