Skip to content

Commit

Permalink
[add] Lark notification actions
Browse files Browse the repository at this point in the history
[optimize] update Upstream packages
  • Loading branch information
TechQuery committed Oct 6, 2024
1 parent 7427e65 commit 6f8c00c
Show file tree
Hide file tree
Showing 5 changed files with 819 additions and 573 deletions.
247 changes: 247 additions & 0 deletions .github/workflows/Lark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
name: Lark notification
on:
push:
issues:
issue_comment:
pull_request:

jobs:
send-Lark-message:
runs-on: ubuntu-latest
steps:
- name: Issue/PR opened
uses: foxundermoon/feishu-action@v2
if: github.event_name == 'issues' && (github.event.action == 'opened' || github.event.action == 'reopened')
with:
url: ${{ secrets.LARK_CHATBOT_HOOK_URL }}
msg_type: post
content: |
post:
zh_cn:
title: GitHub issue 打开:${{ github.event.issue.title }}
content:
- - tag: text
text: 链接:
- tag: a
text: ${{ github.event.issue.html_url }}
href: ${{ github.event.issue.html_url }}
- - tag: text
text: 作者:
- tag: a
text: ${{ github.event.issue.user.login }}
href: ${{ github.event.issue.user.html_url }}
- - tag: text
text: 指派:
- tag: a
text: ${{ github.event.issue.assignee.login }}
href: ${{ github.event.issue.assignee.html_url }}
- - tag: text
text: "标签:${{ github.event.issue.labels }}"
- - tag: text
text: 里程碑:${{ github.event.issue.milestone.title }}
- - tag: text
text: 内容:
- tag: text
text: |
${{ github.event.issue.body }}
- name: Issue edited
uses: foxundermoon/feishu-action@v2
if: github.event_name == 'issues' && (github.event.action == 'edited' || github.event.action == 'transferred' || github.event.action == 'labeled' || github.event.action == 'unlabeled' || github.event.action == 'assigned' || github.event.action == 'unassigned')
with:
url: ${{ secrets.LARK_CHATBOT_HOOK_URL }}
msg_type: post
content: |
post:
zh_cn:
title: GitHub issue 编辑:${{ github.event.issue.title }}
content:
- - tag: text
text: 链接:
- tag: a
text: ${{ github.event.issue.html_url }}
href: ${{ github.event.issue.html_url }}
- - tag: text
text: 作者:
- tag: a
text: ${{ github.event.issue.user.login }}
href: ${{ github.event.issue.user.html_url }}
- - tag: text
text: 指派:
- tag: a
text: ${{ github.event.issue.assignee.login }}
href: ${{ github.event.issue.assignee.html_url }}
- - tag: text
text: "标签:${{ github.event.issue.labels }}"
- - tag: text
text: 里程碑:${{ github.event.issue.milestone.title }}
- - tag: text
text: 内容:
- tag: text
text: |
${{ github.event.issue.body }}
- name: Issue closed
uses: foxundermoon/feishu-action@v2
if: github.event_name == 'issues' && github.event.action == 'closed'
with:
url: ${{ secrets.LARK_CHATBOT_HOOK_URL }}
msg_type: post
content: |
post:
zh_cn:
title: GitHub issue 关闭:${{ github.event.issue.title }}
content:
- - tag: text
text: 链接:
- tag: a
text: ${{ github.event.issue.html_url }}
href: ${{ github.event.issue.html_url }}
- - tag: text
text: 作者:
- tag: a
text: ${{ github.event.issue.user.login }}
href: ${{ github.event.issue.user.html_url }}
- - tag: text
text: 指派:
- tag: a
text: ${{ github.event.issue.assignee.login }}
href: ${{ github.event.issue.assignee.html_url }}
- - tag: text
text: "标签:${{ github.event.issue.labels }}"
- - tag: text
text: 里程碑:${{ github.event.issue.milestone.title }}
- - tag: text
text: 内容:
- tag: text
text: |
${{ github.event.issue.body }}
- name: PR opened
uses: foxundermoon/feishu-action@v2
if: github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened')
with:
url: ${{ secrets.LARK_CHATBOT_HOOK_URL }}
msg_type: post
content: |
post:
zh_cn:
title: GitHub PR 打开:${{ github.event.pull_request.title }}
content:
- - tag: text
text: 链接:
- tag: a
text: ${{ github.event.pull_request.html_url }}
href: ${{ github.event.pull_request.html_url }}
- - tag: text
text: 作者:
- tag: a
text: ${{ github.event.pull_request.user.login }}
href: ${{ github.event.pull_request.user.html_url }}
- - tag: text
text: 指派:
- tag: a
text: ${{ github.event.pull_request.assignee.login }}
href: ${{ github.event.pull_request.assignee.html_url }}
- - tag: text
text: "标签:${{ github.event.pull_request.labels }}"
- - tag: text
text: 里程碑:${{ github.event.pull_request.milestone.title }}
- - tag: text
text: 内容:
- tag: text
text: |
${{ github.event.pull_request.body }}
- name: PR edited
uses: foxundermoon/feishu-action@v2
if: github.event_name == 'pull_request' && (github.event.action == 'edited' || github.event.action == 'labeled' || github.event.action == 'unlabeled' || github.event.action == 'assigned' || github.event.action == 'unassigned')
with:
url: ${{ secrets.LARK_CHATBOT_HOOK_URL }}
msg_type: post
content: |
post:
zh_cn:
title: GitHub PR 编辑:${{ github.event.pull_request.title }}
content:
- - tag: text
text: 链接:
- tag: a
text: ${{ github.event.pull_request.html_url }}
href: ${{ github.event.pull_request.html_url }}
- - tag: text
text: 作者:
- tag: a
text: ${{ github.event.pull_request.user.login }}
href: ${{ github.event.pull_request.user.html_url }}
- - tag: text
text: 指派:
- tag: a
text: ${{ github.event.pull_request.assignee.login }}
href: ${{ github.event.pull_request.assignee.html_url }}
- - tag: text
text: "标签:${{ github.event.pull_request.labels }}"
- - tag: text
text: 里程碑:${{ github.event.pull_request.milestone.title }}
- - tag: text
text: 内容:
- tag: text
text: |
${{ github.event.pull_request.body }}
- name: PR closed
uses: foxundermoon/feishu-action@v2
if: github.event_name == 'pull_request' && github.event.action == 'closed'
with:
url: ${{ secrets.LARK_CHATBOT_HOOK_URL }}
msg_type: post
content: |
post:
zh_cn:
title: GitHub PR 关闭:${{ github.event.pull_request.title }}
content:
- - tag: text
text: 链接:
- tag: a
text: ${{ github.event.pull_request.html_url }}
href: ${{ github.event.pull_request.html_url }}
- - tag: text
text: 作者:
- tag: a
text: ${{ github.event.pull_request.user.login }}
href: ${{ github.event.pull_request.user.html_url }}
- - tag: text
text: 指派:
- tag: a
text: ${{ github.event.pull_request.assignee.login }}
href: ${{ github.event.pull_request.assignee.html_url }}
- - tag: text
text: "标签:${{ github.event.pull_request.labels }}"
- - tag: text
text: 里程碑:${{ github.event.pull_request.milestone.title }}
- - tag: text
text: 内容:
- tag: text
text: |
${{ github.event.pull_request.body }}
- name: Issue commented
uses: foxundermoon/feishu-action@v2
if: github.event_name == 'issue_comment' && (github.event.action == 'created' || github.event.action == 'edited')
with:
url: ${{ secrets.LARK_CHATBOT_HOOK_URL }}
msg_type: post
content: |
post:
zh_cn:
title: GitHub issue 评论:${{ github.event.issue.title }}
content:
- - tag: text
text: 链接:
- tag: a
text: ${{ github.event.comment.html_url }}
href: ${{ github.event.comment.html_url }}
- - tag: text
text: 作者:
- tag: a
text: ${{ github.event.comment.user.login }}
href: ${{ github.event.comment.user.html_url }}
- - tag: text
text: 内容:
- tag: text
text: |
${{ github.event.comment.body }}
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@koa/cors": "^5.0.0",
"@koa/multer": "^3.0.2",
"@koa/router": "^13.0.0",
"@koa/router": "^13.1.0",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"cross-env": "^7.0.3",
Expand All @@ -28,34 +28,34 @@
"marked": "^14.1.2",
"mobx-github": "^0.3.4",
"mobx-restful": "^1.0.1",
"pg": "^8.12.0",
"pg-connection-string": "^2.6.4",
"pg": "^8.13.0",
"pg-connection-string": "^2.7.0",
"reflect-metadata": "^0.2.2",
"routing-controllers": "^0.10.4",
"routing-controllers-openapi": "^4.0.0",
"tslib": "^2.7.0",
"typeorm": "npm:@helveg/typeorm@^0.3.20",
"typeorm": "npm:@helveg/typeorm@^0.3.21",
"undici": "^6.19.8",
"web-utility": "^4.4.0"
},
"devDependencies": {
"@types/jest": "^29.5.12",
"@types/jsonwebtoken": "^9.0.6",
"@types/jest": "^29.5.13",
"@types/jsonwebtoken": "^9.0.7",
"@types/koa": "^2.15.0",
"@types/koa-logger": "^3.1.5",
"@types/node": "^20.16.5",
"@typescript-eslint/eslint-plugin": "^8.5.0",
"@typescript-eslint/parser": "^8.5.0",
"eslint": "^8.57.0",
"@types/node": "^20.16.10",
"@typescript-eslint/eslint-plugin": "^8.8.0",
"@typescript-eslint/parser": "^8.8.0",
"eslint": "^8.57.1",
"eslint-plugin-simple-import-sort": "^12.1.1",
"get-git-folder": "^0.1.2",
"husky": "^9.1.5",
"husky": "^9.1.6",
"jest": "^29.7.0",
"koajax": "^3.0.2",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"sqlite3": "^5.1.7",
"start-server-and-test": "^2.0.7",
"start-server-and-test": "^2.0.8",
"swagger-typescript-api": "^13.0.22",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
Expand Down
Loading

0 comments on commit 6f8c00c

Please sign in to comment.