-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (39 loc) · 1.44 KB
/
email-on-need-review.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Send Email on Need Review Issue
on:
issues:
types: [edited]
jobs:
GPT_send_email:
# if: "github.event_name == 'project_card' && github.event.project_card.column_name == 'Needs Review'"
runs-on: ubuntu-latest
# "value": "An issue has been moved into the 'Needs Review' column.\n\nIssue Title: ${{ github.event.project_card.content.title }}\nIssue URL: ${{ github.event.project_card.content_url }}"
steps:
- name: Send Email Notification
env:
SENDGRID_API_KEY: '${{ secrets.SENDGRID_API_KEY }}'
run: |
curl --request POST \
--url https://api.sendgrid.com/v3/mail/send \
--header "Authorization: Bearer $SENDGRID_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"personalizations": [
{
"to": [
{
"email": "avi.micah@gmail.com"
}
],
"subject": "Issue Needs Review"
}
],
"from": {
"email": "avi.micah@gmail.com"
},
"content": [
{
"type": "text/plain",
"value": "An issue has been moved into the '\''Needs Review'\'' column.\n\nIssue Title: title\nIssue URL: https://github.com/SFUnity/Mayhem-2024-Offseason"
}
]
}'