Skip to content

Commit

Permalink
changed way the data gets stored
Browse files Browse the repository at this point in the history
  • Loading branch information
michelengelen committed May 6, 2024
1 parent 3e10e3e commit 4e217c0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/reusable-add-reviewers-to-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,18 @@ jobs:
DATA=$(gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/orgs/${{ github.repository_owner }}/teams/${{ inputs.team-slug }}/members \
| jq 'reduce inputs as $i (.; . += $i)') \
/orgs/${{ github.repository_owner }}/teams/${{ inputs.team-slug }}/members)
echo $DATA
echo "data=$DATA" >> $GITHUB_OUTPUT
# assign reviewers
- id: assign-reviewers
run: |
echo join(steps.get-members.outputs.data.*.login)
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.token }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository_owner }}/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/requested_reviewers \
-d '{"reviewers":[${{ join(fromJson(steps.get-members.outputs.data).*.login) }}]}' \
-d '{"reviewers":[${{ join(steps.get-members.outputs.data.*.login) }}]}' \

0 comments on commit 4e217c0

Please sign in to comment.