Skip to content

Issue and Discussions Trigger #169

Issue and Discussions Trigger

Issue and Discussions Trigger #169

Workflow file for this run

name: Issue and Discussions Trigger
on:
issues:
types: [opened]
discussion:
types: [created]
jobs:
send_message:
runs-on: ubuntu-latest
steps:
- name: Send message
run: |
generate_post_data(){
text="有新的 Discussion"
if [ ${{ github.event_name }} == "issues" ]; then
text="有新的 Issue"
fi
cat <<EOF
{
"msg_type": "text",
"content": {
"text": "$text"
}
}
EOF
}
curl -X POST -H "Content-Type: application/json" \
-d "$(generate_post_data)" \
https://open.feishu.cn/open-apis/bot/v2/hook/${{ secrets.FEISHU_BOT_WEBHOOK_URL }}