File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 1
1
name : Notify Discord on PR Merge
2
2
on :
3
3
workflow_dispatch :
4
- pull_request :
4
+ pull_request_target :
5
5
types : [closed]
6
6
7
7
jobs :
8
8
notify :
9
9
runs-on : ubuntu-latest
10
+ if : github.event.pull_request.merged == true
10
11
steps :
11
12
- name : Get User Permission
12
13
id : checkAccess
23
24
echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}"
24
25
echo "Job originally triggered by ${{ github.actor }}"
25
26
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
30
27
- name : Send Discord notification
31
- # if: github.event.pull_request.merged == true
32
28
run : |
33
29
curl -H "Content-Type: application/json" -d '{"content": "Pull Request ${{ github.event.pull_request.number }} merged by ${{ github.actor }}"}' ${{ secrets.DISCORD_WEBHOOK_BETA_TESTERS }}
You can’t perform that action at this time.
0 commit comments