File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ name: Auto Assign Reviewer
2
2
3
3
on :
4
4
pull_request_target :
5
- types : [opened, ready_for_review]
5
+ types : [opened, ready_for_review, synchronize]
6
+ workflow_dispatch : {}
6
7
7
8
permissions :
8
9
pull-requests : write
@@ -27,12 +28,17 @@ jobs:
27
28
pip install pyyaml
28
29
29
30
- name : Authenticate with GitHub
30
- run : echo "${{ secrets.GH_PAT }}" | gh auth login --with-token
31
- env :
32
- GH_TOKEN : ${{ secrets.GH_PAT }}
31
+ run : |
32
+ if [ -z "${{ secrets.GH_PAT }}" ]; then
33
+ echo "Error: GH_PAT secret is not set"
34
+ exit 1
35
+ fi
36
+ # Use PAT directly without gh auth login
37
+ echo "Using PAT for authentication"
33
38
34
39
- name : Assign reviewer
35
40
env :
36
41
PR_NUMBER : ${{ github.event.pull_request.number }}
42
+ GH_TOKEN : ${{ secrets.GH_PAT }}
37
43
run : |
38
44
python .github/scripts/assign_reviewer.py
You can’t perform that action at this time.
0 commit comments