Skip to content

1

1 #41

Workflow file for this run

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 WeCom notify
run: |
curl -X POST "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=${{ secrets.WECOM_KEY }}" \
-H "Content-Type: application/json" \
-d '{
"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 }} 新增评论"
}
}'