Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
GHARBIyasmine authored Dec 1, 2024
1 parent 877bd83 commit cb8b36a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ jobs:
echo "Current Categories: $CURRENT_CATEGORIES"

# Loop through current categories
while IFS= read -r category; do
if [[ ! "$BASELINE_CATEGORIES" =~ $category ]]; then
echo "$CURRENT_CATEGORIES" | while IFS= read -r category; do
if ! echo "$BASELINE_CATEGORIES" | grep -Fxq "$category"; then
echo "::warning::New category detected: $category"
else
BASELINE_COUNT=$(jq -r ".findings.categories[\"$category\"]" "$BASELINE_REPORT")
Expand All @@ -184,14 +184,14 @@ jobs:
echo "Category '$category' count remains the same: $CURRENT_COUNT. Persistent issue."
fi
fi
done < <(echo "$CURRENT_CATEGORIES")
done

# Loop through baseline categories
while IFS= read -r baseline_category; do
if [[ ! "$CURRENT_CATEGORIES" =~ $baseline_category ]]; then
echo "$BASELINE_CATEGORIES" | while IFS= read -r baseline_category; do
if ! echo "$CURRENT_CATEGORIES" | grep -Fxq "$baseline_category"; then
echo "Category '$baseline_category' is no longer present. Improvement noted."
fi
done < <(echo "$BASELINE_CATEGORIES")
done



Expand Down

0 comments on commit cb8b36a

Please sign in to comment.