diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be9f2e8b..c13d8b84 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,12 +37,20 @@ jobs: - name: Select Reviewers id: select_reviewers - if: github.actor != steps.pr_author.outputs.author # Exclude the author - run: echo "::set-output name=reviewers::$(echo -n '["stardustmeg", "Kleostro", "YulikK"]' | jq -r 'shuffle | .[:2] | join(",")')" - - - name: Debug Reviewers run: | - echo "Selected reviewers: ${{ steps.select_reviewers.outputs.reviewers }}" + author="${{ steps.pr_author.outputs.author }}" + all_users=("stardustmeg" "Kleostro" "YulikK") + + potential_reviewers=() + for user in "${all_users[@]}"; do + if [[ "$user" != "$author" ]]; then + potential_reviewers+=("$user") + fi + done + + selected_reviewers=("${potential_reviewers[@]:0:2}") + + echo "::set-output name=reviewers::$(printf '%s' "${selected_reviewers[@]}")" - name: Request Review if: github.actor != steps.pr_author.outputs.author # Exclude the author