66 types : [created]
77 pull_request :
88 branches : ["master"]
9+ types : [opened, reopened]
910
1011jobs :
1112 notify :
@@ -19,25 +20,28 @@ jobs:
1920 PT_URL="${{ github.event.pull_request.patch_url }}"
2021 COMT="${{ github.event.comment.body }}"
2122 COMT_URL="${{ github.event.comment.html_url }}"
23+ EVENT_ACT="${{ github.event.action }}"
2224 echo "Title: $TITLE" > /tmp/body.txt
2325 echo "Description: $DESC" >> /tmp/body.txt
2426 echo "Link: $LINK" >> /tmp/body.txt
2527 [[ -n "$PT_URL" ]] && echo "========" >> /tmp/body.txt \
2628 && echo "Patch: $PT_URL" >> /tmp/body.txt \
27- && curl -L "$URL " >> /tmp/body.txt
29+ && curl -L "$PT_URL " >> /tmp/body.txt
2830 [[ -n "$COMT" ]] && echo "========" >> /tmp/body.txt \
29- && echo "Comment: " >> /tmp/body.txt \
31+ && echo "Comment: $COMT_URL " >> /tmp/body.txt \
3032 && echo "Comment: $COMT" >> /tmp/body.txt
33+ [[ "$EVENT_ACT" == "created" ]] && echo "Comment on Issue/PR: $TITLE" > /tmp/subj.txt \
34+ || echo "New Issue/PR: $TITLE" > /tmp/subj.txt
3135 cat /tmp/body.txt
32- echo "${{ toJSON(github.event) }}"
36+ cat /tmp/subj.txt
3337 - name : Send Email Notification
3438 uses : dawidd6/action-send-mail@v3
3539 with :
3640 server_address : smtp.gmail.com
3741 server_port : 587
3842 username : ${{ secrets.EMAIL_USER }}
3943 password : ${{ secrets.EMAIL_PASS }}
40- subject : " New Issue/PR: ${{ github.event.issue.title || github.event.pull_request.title }} "
44+ subject : file:///tmp/subj.txt
4145 body : file:///tmp/body.txt
42464347 from : " GitHub Bot"
0 commit comments