File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed
Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change 77jobs :
88 check-guidelines :
99 if : |
10- ( github.event_name == 'issue_comment' &&
11- github.event.issue.pull_request &&
12- startsWith( github.event.comment.body, '/review') )
10+ github.event.issue.pull_request &&
11+ startsWith( github.event.comment.body, '/review') &&
12+ contains(fromJson('["OWNER","MEMBER"]'), github.event.comment.author_association )
1313 runs-on : blacksmith-4vcpu-ubuntu-2404
1414 permissions :
1515 contents : read
1616 pull-requests : write
1717 steps :
18- - name : Check if user has write permission
19- if : github.event_name == 'issue_comment'
20- run : |
21- PERMISSION=$(gh api /repos/${{ github.repository }}/collaborators/${{ github.event.comment.user.login }}/permission --jq '.permission')
22- if [[ "$PERMISSION" != "write" && "$PERMISSION" != "admin" ]]; then
23- echo "User does not have write permission"
24- exit 1
25- fi
26- env :
27- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
28-
2918 - name : Get PR number
3019 id : pr-number
3120 run : |
You can’t perform that action at this time.
0 commit comments