-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (58 loc) · 1.9 KB
/
discussions-notice.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
on:
discussion:
types: [created]
discussion_comment:
types: [created]
jobs:
discussion_created:
runs-on: ubuntu-latest
if: github.event.discussion && !github.event.comment
steps:
- run: |
curl -X POST ${{ secrets.SLACK_WEBHOOK_URL }} \
-H 'Content-Type: application/json' \
-d @- << EOF
{
"text": "*<${{ github.event.discussion.user.html_url }}|${{ github.event.discussion.user.login }}>* が Discussions を作成しました",
"attachments": [
{
"color": "#CCCCCC",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*<${{ github.event.discussion.html_url }}|${{ github.event.discussion.title }}>*\n${{ github.event.discussion.body }}",
}
}
]
}
]
}
EOF
discussion_commented:
runs-on: ubuntu-latest
if: github.event.discussion && github.event.comment
steps:
- run: |
curl -X POST ${{ secrets.SLACK_WEBHOOK_URL }} \
-H 'Content-Type: application/json' \
-d @- << EOF
{
"text": "*<${{ github.event.comment.user.html_url }}|${{ github.event.comment.user.login }}>* が Discussions にコメントしました",
"attachments": [
{
"color": "#CCCCCC",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*<${{ github.event.comment.html_url }}|${{ github.event.discussion.title }}>*\n${{ github.event.comment.body }}",
}
}
]
}
]
}
EOF