diff --git a/.github/workflows/notifications.yml b/.github/workflows/notifications.yml index 63f241b..29d4de0 100644 --- a/.github/workflows/notifications.yml +++ b/.github/workflows/notifications.yml @@ -30,27 +30,27 @@ jobs: curl -X "POST" "https://api.sendgrid.com/v3/mail/send" \ -H "Authorization: Bearer $SENDGRID_API_KEY" \ -H 'Content-Type: application/json' \ - -d "{ - \"from\":{ - \"email\":\"notification-pr@simpleswitch.app\" + -d '{ + "from":{ + "email":"notification-pr@simpleswitch.app" }, - \"personalizations\":[ + "personalizations":[ { - \"to\":[ + "to":[ ${{ secrets.LIST_EMAILS_NOTIFICATIONS }} ], - \"dynamic_template_data\":{ - \"subject\": \"New PR opened : $PR on ${{ github.repository }}\", - \"author\": \"${{ steps.email.outputs.email }}\", - \"repo\": \"${{ github.repository }}\", - \"source\": \"$SOURCE\", - \"target\": \"$TARGET\", - \"url\": \"${{ github.event.pull_request.html_url }}\", + "dynamic_template_data":{ + "subject": "New PR opened : ${{ github.event.pull_request.title }} on ${{ github.repository }}", + "author": "${{ steps.email.outputs.email }}", + "repo": "${{ github.repository }}", + "source": "${{ github.head_ref }}", + "target": "${{ github.base_ref }}", + "url": "${{ github.event.pull_request.html_url }}", } } ], - \"template_id\":\"${{ secrets.EMAIL_TEMPLATE_PR }}\" - }" + "template_id":"${{ secrets.EMAIL_TEMPLATE_PR }}" + }' env: SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }} PR: ${{ github.event.pull_request.title }}