Skip to content

Commit

Permalink
chore: update choosing reviewers
Browse files Browse the repository at this point in the history
  • Loading branch information
stardustmeg committed Apr 24, 2024
1 parent a592881 commit 59e981d
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 59e981d

Please sign in to comment.