From 80c4acc001c0da7b0cb65af7af9b849dcfc94624 Mon Sep 17 00:00:00 2001 From: Jun Pataleta Date: Fri, 15 Nov 2024 00:45:09 +0800 Subject: [PATCH] Use proper field separator for parsing available CLRs The list of available CLRers in the `$available` variable are space-separated. So the internal field separator should be set to space instead of comma. Plus a minor fix for empty-checking the `$availableCLR`. --- .../component_leads_integration_mover/lib.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tracker_automations/component_leads_integration_mover/lib.sh b/tracker_automations/component_leads_integration_mover/lib.sh index f3cfb5b..cba2c21 100755 --- a/tracker_automations/component_leads_integration_mover/lib.sh +++ b/tracker_automations/component_leads_integration_mover/lib.sh @@ -172,14 +172,14 @@ function verify_revievers_availability() { return # Outcome set, we are done. fi - # There is some component lead reviewer available, let's send the issue to CLR. This check is done. + # There is at least one component lead reviewer available, let's send the issue to CLR. This check is done. echo " - There are available reviewers (${available}) for the issue." outcome=CLR availableProfiles=() - IFS=, read -r -a availableCLRs <<<"$available" + IFS=' ' read -r -a availableCLRs <<<"$available" for availableCLR in "${availableCLRs[@]}"; do availableCLR=$(trimstring "$availableCLR") - if [[ -z ${available} ]]; then + if [[ -z ${availableCLR} ]]; then continue fi availableProfiles+=("[~${availableCLR}]")