Skip to content

Update pr-notification.yml #2

Update pr-notification.yml

Update pr-notification.yml #2

name: PR Notification to Google Chat
on:
pull_request:
types: [opened, synchronize]
branches:
- develop
jobs:
notify:
runs-on: ubuntu-latest
if: github.repository == 'AOT-Technologies/forms-flow-ai-micro-front-ends'
steps:
- name: Send notification to Google Chat
uses: fjogeleit/[email protected]
with:
url: ${{ secrets.WEBHOOK }}
method: POST
contentType: application/json
data: '{
"cards": [
{
"header": {
"title": "Micro front-ends: Pull Request Opened by ${{ github.event.pull_request.user.login }}",
"subtitle": "Pull Request #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}",
"imageUrl": "${{ github.event.pull_request.user.avatar_url }}"
},
"sections": [
{
"widgets": [
{
"textParagraph": {
"text": "Repository: ${{ github.repository }}"
}
},
{
"textParagraph": {
"text": "Status: ${{ github.event.action == 'opened' ? '🟢 Open' : github.event.action == 'closed' ? '🔴 Closed' : '🟣 Merged' }}"

Check failure on line 39 in .github/workflows/pr-notification.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/pr-notification.yml

Invalid workflow file

You have an error in your yaml syntax on line 39
}
},
{
"buttons": [
{
"textButton": {
"text": "View Pull Request",
"onClick": {
"openLink": {
"url": "${{ github.event.pull_request.html_url }}"
}
}
}
}
]
}
]
}
]
}
]
}'