From 17def04e0af2b41dc0fbb5b9851b1cd856c608c6 Mon Sep 17 00:00:00 2001 From: ibo <41344259+sneazy-ibo@users.noreply.github.com> Date: Fri, 21 Jun 2024 03:45:31 +0200 Subject: [PATCH] fix: processing + logging --- .github/workflows/beta.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml index 8a34941c..858dd1d2 100644 --- a/.github/workflows/beta.yml +++ b/.github/workflows/beta.yml @@ -113,11 +113,16 @@ jobs: "https://api.github.com/repos/rebelonion/Dantotsu/contributors") echo "Contributors response:" echo "$contributors" | jq '.' + # Validate contributors JSON + if ! echo "$contributors" | jq empty; then + echo "Error: Invalid JSON in contributors response" + exit 1 + fi # Process contributors developers="" while read -r author; do echo "Processing author: $author" - contributor=$(echo "$contributors" | jq -r ".[] | select(.login|ascii_downcase == \"$author\"|ascii_downcase)") + ccontributor=$(echo "$contributors" | jq -r ".[] | select(.login | ascii_downcase == \"$(echo $author | tr '[:upper:]' '[:lower:])\")") if [ ! -z "$contributor" ]; then login=$(echo "$contributor" | jq -r '.login') commits=$(echo "$contributor" | jq -r '.contributions')