-
Notifications
You must be signed in to change notification settings - Fork 42
33 lines (31 loc) · 1.11 KB
/
comment.yml
File metadata and controls
33 lines (31 loc) · 1.11 KB
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
name: COMMENT
on:
issue_comment:
types: [created]
jobs:
push-comment:
runs-on: ubuntu-latest
if: contains(github.event.issue.labels.*.name, 'pick')
steps:
- uses: actions/checkout@v3
- id: title
run: |
title=`echo ${{ toJson(github.event.issue.title) }} | sed "s/\"/\\\'/g"`
echo "::set-output name=title::$title"
- id: body
run: |
body=`echo ${{ toJson(github.event.comment.body) }} | sed "s/\"/\\\'/g"`
echo "::set-output name=body::$body"
- name: Send dingding notify
uses: zcong1993/actions-ding@master
with:
dingToken: ${{ secrets.PICKER_DINGTALK_KEY }}
secret: ${{ secrets.PICKER_DINGTALK_SECRET }}
body: |
{
"msgtype": "markdown",
"markdown": {
"text": " ${{ github.event.comment.user.login }} 评论了 [${{ steps.title.outputs.title }}](${{ github.event.comment.html_url }}): \n\n${{ steps.body.outputs.body }}",
"title": "${{ steps.title.outputs.title }} 新增评论"
}
}