Skip to content

Conversation

@junpataleta
Copy link
Contributor

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, there is a minor fix for empty-checking the $availableCLR.

To test this fix:

  1. Clone the repo.
  2. Include tracker_automations/component_leads_integration_mover/lib.sh. (We just want to include the trimstring() function.)
source path/to/tracker_automations/component_leads_integration_mover/lib.sh
  1. Copy and paste the following script:
available="amaia tusefomal"
# This is the code snippet containing the fix.
availableProfiles=()
IFS=' ' read -r -a availableCLRs <<<"$available"
for availableCLR in "${availableCLRs[@]}"; do
    availableCLR=$(trimstring "$availableCLR")
    if [[ -z ${availableCLR} ]]; then
        continue
    fi
    availableProfiles+=("[~${availableCLR}]")
done
outcomedesc=$(IFS=, ; echo "Sending to CLR, there are available reviewers for the issue: ${availableProfiles[*]}")
# Check the value for outcomedesc.
echo $outcomedesc
  1. Confirm you see Sending to CLR, there are available reviewers for the issue: [~amaia],[~tusefomal]

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`.
@codecov-commenter
Copy link

codecov-commenter commented Nov 14, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 31.50%. Comparing base (175395f) to head (80c4acc).

Files with missing lines Patch % Lines
...tomations/component_leads_integration_mover/lib.sh 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #320      +/-   ##
==========================================
- Coverage   33.12%   31.50%   -1.62%     
==========================================
  Files          71       71              
  Lines        3215     3215              
==========================================
- Hits         1065     1013      -52     
- Misses       2150     2202      +52     
Flag Coverage Δ
check_upgrade_savepoints 0.46% <0.00%> (ø)
checkstyle_manipulations 0.00% <0.00%> (ø)
compare_databases 2.39% <0.00%> (ø)
continuous_manage_queues_validation 0.71% <0.00%> (ø)
define_excluded 1.11% <0.00%> (ø)
detect_conflicts ?
diff_extract_changes 0.00% <0.00%> (ø)
git_sync_two_branches 2.05% <0.00%> (ø)
grunt_process 3.01% <0.00%> (ø)
illegal_whitespace 2.64% <0.00%> (ø)
list_valid_components 0.00% <0.00%> (ø)
mustache_lint 2.83% <0.00%> (ø)
mustache_lint_plugins 1.30% <0.00%> (ø)
php_lint 1.21% <0.00%> (ø)
prepare_npm_stuff ?
remote_branch_checker 17.41% <0.00%> (-0.07%) ⬇️
remote_branch_reporter 0.00% <0.00%> (ø)
setup 0.00% <0.00%> (ø)
thirdparty_check 1.46% <0.00%> (ø)
travis-branch-checker 0.00% <0.00%> (ø)
upgrade_external_backup 1.61% <0.00%> (ø)
verifications 0.00% <0.00%> (ø)
verify_commit_messages 2.64% <0.00%> (ø)
verify_phpunit_xml 1.24% <0.00%> (ø)
versions_check_set 5.03% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@HuongNV13 HuongNV13 self-requested a review November 15, 2024 01:52
@HuongNV13
Copy link
Contributor

Thanks, Jun
The fix looks right to me.
I have tested and it works as expected

@HuongNV13 HuongNV13 merged commit 87c1bf8 into moodlehq:main Nov 15, 2024
49 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants