-
Notifications
You must be signed in to change notification settings - Fork 3
68 lines (66 loc) · 2.81 KB
/
issue-creation.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
57
58
59
60
61
62
63
64
65
66
67
68
name: Issue Creation Tracker
on:
issues:
types: [ opened, reopened ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Git Issue Details
run: |
echo "Issue creator: ${{ github.event.issue.user.login }}"
echo "Issue title: ${{ github.event.issue.title }}"
echo "Issue number: ${{ github.event.issue.number }}"
echo "Issue url: ${{ github.event.issue.html_url }}"
- name: Google Chat Notification
run: |
curl --location --request POST '${{ secrets.ISSUE_TRACKER_WEBHOOK }}' \
--header 'Content-Type: application/json' \
--data-raw '{
"cards": [
{
"header": {
"title": "New Issue 🔨",
"subtitle": "Issue No: #${{ github.event.issue.number }}"
},
"sections": [
{
"widgets": [
{
"keyValue": {
"topLabel": "Repository",
"content": "${{ github.repository }}"
},
},
{
"keyValue": {
"topLabel": "Title",
"content": "${{ github.event.issue.title }}"
}
},
{
"keyValue": {
"topLabel": "Assigned Labels",
"content": "- ${{ join(github.event.issue.labels.*.name) }}"
}
},
{
"buttons": [
{
"textButton": {
"text": "OPEN ISSUE",
"onClick": {
"openLink": {
"url": "${{ github.event.issue.html_url }}"
}
}
}
}
]
}
]
}
]
}
]
}'