mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/yunionio/cloudpods.git
synced 2026-09-20 08:03:53 +08:00
feat(actions): add issue notification
This commit is contained in:
17
.github/workflows/issue-notify.yml
vendored
Normal file
17
.github/workflows/issue-notify.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
notify-author-comment:
|
||||
runs-on: ubuntu-latest
|
||||
if: (github.event.issue.user.id == github.event.comment.user.id) && !github.event.issue.pull_request
|
||||
# find context from: https://docs.github.com/en/webhooks/webhook-events-and-payloads#issue_comment
|
||||
steps:
|
||||
- name: feishu notify
|
||||
uses: zexi/action-issues-notify@v1
|
||||
with:
|
||||
url: ${{ secrets.FEISHU_BOT_WEBHOOK_URL }}
|
||||
issue_title: "${{ github.event.comment.user.login }} 回复了 issue: ${{ github.event.issue.title }}"
|
||||
issue_body: "${{ tojson(github.event.comment.body) }}"
|
||||
issue_link_url: "${{github.event.comment.html_url}}"
|
||||
19
.github/workflows/issue-open.yml
vendored
19
.github/workflows/issue-open.yml
vendored
@@ -2,7 +2,7 @@ name: Issue Open Check
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
types: [opened, reopened]
|
||||
|
||||
jobs:
|
||||
issue-open-add-labels:
|
||||
@@ -14,3 +14,20 @@ jobs:
|
||||
with:
|
||||
actions: 'add-labels'
|
||||
labels: 'state/awaiting processing'
|
||||
|
||||
- name: Remove require reply label
|
||||
uses: actions-cool/issues-helper@v2
|
||||
with:
|
||||
actions: 'remove-labels'
|
||||
labels: 'state/awaiting user feedback,stale'
|
||||
|
||||
notify-author-comment:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: feishu notify
|
||||
uses: zexi/action-issues-notify@v1
|
||||
with:
|
||||
url: ${{ secrets.FEISHU_BOT_WEBHOOK_URL }}
|
||||
issue_title: "${{ github.event.issue.user.login }} 提交了 issue: ${{ github.event.issue.title }}"
|
||||
issue_body: "${{ tojson(github.event.issue.body) }}"
|
||||
issue_link_url: "${{github.event.issue.html_url}}"
|
||||
|
||||
Reference in New Issue
Block a user