Skip to content

Commit

Permalink
fix: action token으로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
soi-ha committed Jul 22, 2024
1 parent 30abc40 commit 5a5d990
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/assign-reviewer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
- name: Fetch repository collaborators
id: fetch-collaborators
run: |
RESPONSE=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
RESPONSE=$(curl -s -H "Authorization: token ${{ secrets.ACTION_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/collaborators")
COLLABORATORS=$(echo "$RESPONSE" | jq -r '.[].login' | tr '\n' ' ')
echo "COLLABORATORS=$COLLABORATORS" >> $GITHUB_ENV
- name: Fetch existing PR reviewers
id: fetch-pr-reviewers
run: |
RESPONSE=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
RESPONSE=$(curl -s -H "Authorization: token ${{ secrets.ACTION_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/requested_reviewers")
EXISTING_REVIEWERS=$(echo "$RESPONSE" | jq -r '.users[].login' | sort | uniq | tr '\n' ' ')
echo "EXISTING_REVIEWERS=$EXISTING_REVIEWERS" >> $GITHUB_ENV
Expand Down Expand Up @@ -63,6 +63,6 @@ jobs:
run: |
curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Authorization: token ${{ secrets.ACTION_TOKEN }}" \
-d '{"reviewers":["${{ env.SELECTED_COLLABORATOR }}"]}' \
"https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/requested_reviewers"

0 comments on commit 5a5d990

Please sign in to comment.