Skip to content

Commit c2e62e4

Browse files
committed
Resolve GH_TOKEN conflict in auto-reviewer workflow
1 parent f66c53a commit c2e62e4

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.github/workflows/auto-review.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Auto Assign Reviewer
22

33
on:
44
pull_request_target:
5-
types: [opened, ready_for_review, synchronize]
5+
types: [opened, ready_for_review]
66
workflow_dispatch: {}
77

88
permissions:
@@ -29,16 +29,15 @@ jobs:
2929
3030
- name: Authenticate with GitHub
3131
run: |
32-
if [ -z "${{ secrets.GH_PAT }}" ]; then
33-
echo "Error: GH_PAT secret is not set"
32+
if [ -z "${{ secrets.REVIEWER_TOKEN }}" ]; then
33+
echo "Error: REVIEWER_TOKEN secret is not set"
3434
exit 1
3535
fi
36-
# Use PAT directly without gh auth login
37-
echo "Using PAT for authentication"
36+
echo "Using organization token for authentication"
3837
3938
- name: Assign reviewer
4039
env:
4140
PR_NUMBER: ${{ github.event.pull_request.number }}
42-
GH_TOKEN: ${{ secrets.GH_PAT }}
41+
GH_TOKEN: ${{ secrets.REVIEWER_TOKEN }}
4342
run: |
4443
python .github/scripts/assign_reviewer.py

0 commit comments

Comments
 (0)