File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 88 notify :
99 runs-on : ubuntu-latest
1010 steps :
11+ - name : Get User Permission
12+ id : checkAccess
13+ uses : actions-cool/check-user-permission@v2
14+ with :
15+ require : write
16+ username : ${{ github.triggering_actor }}
17+ env :
18+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
19+ - name : Check User Permission
20+ if : steps.checkAccess.outputs.require-result == 'false'
21+ run : |
22+ echo "${{ github.triggering_actor }} does not have permissions on this repo."
23+ echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}"
24+ echo "Job originally triggered by ${{ github.actor }}"
25+ exit 1
26+ - name : Checkout code
27+ uses : actions/checkout@v3
28+ with :
29+ ref : ${{ github.event.pull_request.head.sha }} # This is dangerous without the first access check
1130 - name : Send Discord notification
1231 shell : bash
1332 env :
You can’t perform that action at this time.
0 commit comments