Skip to content

Test Webhook

Test Webhook #2

name: Google Chat Notification
on:
pull_request:
types: [opened, reopened, closed]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Send notification to Google Chat
env:
WEBHOOK_URL: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_URL: ${{ github.event.pull_request.html_url }}
PR_ACTION: ${{ github.event.action }}
run: |
curl -X POST -H "Content-Type: application/json" -d '{
"text": "Pull Request ${{ env.PR_ACTION }}:\n${{ env.PR_TITLE }}\n${{ env.PR_URL }}"
}' ${{ env.WEBHOOK_URL }}