-
Notifications
You must be signed in to change notification settings - Fork 23
56 lines (53 loc) · 1.77 KB
/
pr-notification.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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 }}"
}
},
{
"buttons": [
{
"textButton": {
"text": "View Pull Request",
"onClick": {
"openLink": {
"url": "${{ github.event.pull_request.html_url }}"
}
}
}
}
]
}
]
}
]
}
]
}'