Skip to content

Commit d8aaefa

Browse files
committed
fix: resolve GH_TOKEN auth conflict in auto-reviewer workflow
1 parent 8ed1134 commit d8aaefa

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/auto-review.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,14 @@ jobs:
2727
pip install pyyaml
2828
2929
- name: Authenticate with GitHub
30-
run: echo "${{ secrets.GH_PAT }}" | gh auth login --with-token
31-
env:
32-
GH_TOKEN: ${{ secrets.GH_PAT }}
30+
run: |
31+
if [ -z "${{ secrets.GH_PAT }}" ]; then
32+
echo "Error: GH_PAT secret is not set"
33+
exit 1
34+
fi
35+
# Clear GH_TOKEN to avoid conflicts with GITHUB_TOKEN
36+
unset GH_TOKEN
37+
echo "${{ secrets.GH_PAT }}" | gh auth login --with-token
3338
3439
- name: Assign reviewer
3540
env:

0 commit comments

Comments
 (0)