diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c13d8b84..da65af24 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,6 +41,7 @@ jobs: author="${{ steps.pr_author.outputs.author }}" all_users=("stardustmeg" "Kleostro" "YulikK") + # Exclude the PR author from the list of potential reviewers potential_reviewers=() for user in "${all_users[@]}"; do if [[ "$user" != "$author" ]]; then @@ -48,6 +49,7 @@ jobs: fi done + # Select two reviewers from the potential reviewers list selected_reviewers=("${potential_reviewers[@]:0:2}") echo "::set-output name=reviewers::$(printf '%s' "${selected_reviewers[@]}")" @@ -59,4 +61,4 @@ jobs: route: POST /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/requested_reviewers mediaType: '{"previews":["luke-cage"]}' token: ${{ secrets.GITHUB_TOKEN }} - reviewers: ${{ steps.select_reviewers.outputs.reviewers }} + reviewers: ${{ steps.select_reviewers.outputs.reviewers[0] }}, ${{ steps.select_reviewers.outputs.reviewers[1] }}