Skip to content

Commit aad3ed2

Browse files
committed
[add] Lark notification actions
[optimize] update Upstream packages
1 parent 7427e65 commit aad3ed2

File tree

5 files changed

+819
-573
lines changed

5 files changed

+819
-573
lines changed

.github/workflows/Lark.yml

Lines changed: 247 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,247 @@
1+
name: Lark notification
2+
on:
3+
push:
4+
issues:
5+
issue_comment:
6+
pull_request:
7+
8+
jobs:
9+
send-Lark-message:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Issue/PR opened
13+
uses: foxundermoon/feishu-action@v2
14+
if: github.event_name == 'issues' && (github.event.action == 'opened' || github.event.action == 'reopened')
15+
with:
16+
url: ${{ secrets.LARK_CHATBOT_HOOK_URL }}
17+
msg_type: post
18+
content: |
19+
post:
20+
zh_cn:
21+
title: GitHub issue 打开:${{ github.event.issue.title }}
22+
content:
23+
- - tag: text
24+
text: 链接:
25+
- tag: a
26+
text: ${{ github.event.issue.html_url }}
27+
href: ${{ github.event.issue.html_url }}
28+
- - tag: text
29+
text: 作者:
30+
- tag: a
31+
text: ${{ github.event.issue.user.login }}
32+
href: ${{ github.event.issue.user.html_url }}
33+
- - tag: text
34+
text: 指派:
35+
- tag: a
36+
text: ${{ github.event.issue.assignee.login }}
37+
href: ${{ github.event.issue.assignee.html_url }}
38+
- - tag: text
39+
text: "标签:${{ github.event.issue.labels }}"
40+
- - tag: text
41+
text: 里程碑:${{ github.event.issue.milestone.title }}
42+
- - tag: text
43+
text: 内容:
44+
- tag: text
45+
text: |
46+
${{ github.event.issue.body }}
47+
- name: Issue edited
48+
uses: foxundermoon/feishu-action@v2
49+
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')
50+
with:
51+
url: ${{ secrets.LARK_CHATBOT_HOOK_URL }}
52+
msg_type: post
53+
content: |
54+
post:
55+
zh_cn:
56+
title: GitHub issue 编辑:${{ github.event.issue.title }}
57+
content:
58+
- - tag: text
59+
text: 链接:
60+
- tag: a
61+
text: ${{ github.event.issue.html_url }}
62+
href: ${{ github.event.issue.html_url }}
63+
- - tag: text
64+
text: 作者:
65+
- tag: a
66+
text: ${{ github.event.issue.user.login }}
67+
href: ${{ github.event.issue.user.html_url }}
68+
- - tag: text
69+
text: 指派:
70+
- tag: a
71+
text: ${{ github.event.issue.assignee.login }}
72+
href: ${{ github.event.issue.assignee.html_url }}
73+
- - tag: text
74+
text: "标签:${{ github.event.issue.labels }}"
75+
- - tag: text
76+
text: 里程碑:${{ github.event.issue.milestone.title }}
77+
- - tag: text
78+
text: 内容:
79+
- tag: text
80+
text: |
81+
${{ github.event.issue.body }}
82+
- name: Issue closed
83+
uses: foxundermoon/feishu-action@v2
84+
if: github.event_name == 'issues' && github.event.action == 'closed'
85+
with:
86+
url: ${{ secrets.LARK_CHATBOT_HOOK_URL }}
87+
msg_type: post
88+
content: |
89+
post:
90+
zh_cn:
91+
title: GitHub issue 关闭:${{ github.event.issue.title }}
92+
content:
93+
- - tag: text
94+
text: 链接:
95+
- tag: a
96+
text: ${{ github.event.issue.html_url }}
97+
href: ${{ github.event.issue.html_url }}
98+
- - tag: text
99+
text: 作者:
100+
- tag: a
101+
text: ${{ github.event.issue.user.login }}
102+
href: ${{ github.event.issue.user.html_url }}
103+
- - tag: text
104+
text: 指派:
105+
- tag: a
106+
text: ${{ github.event.issue.assignee.login }}
107+
href: ${{ github.event.issue.assignee.html_url }}
108+
- - tag: text
109+
text: "标签:${{ github.event.issue.labels }}"
110+
- - tag: text
111+
text: 里程碑:${{ github.event.issue.milestone.title }}
112+
- - tag: text
113+
text: 内容:
114+
- tag: text
115+
text: |
116+
${{ github.event.issue.body }}
117+
- name: PR opened
118+
uses: foxundermoon/feishu-action@v2
119+
if: github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened')
120+
with:
121+
url: ${{ secrets.LARK_CHATBOT_HOOK_URL }}
122+
msg_type: post
123+
content: |
124+
post:
125+
zh_cn:
126+
title: GitHub PR 打开:${{ github.event.pull_request.title }}
127+
content:
128+
- - tag: text
129+
text: 链接:
130+
- tag: a
131+
text: ${{ github.event.pull_request.html_url }}
132+
href: ${{ github.event.pull_request.html_url }}
133+
- - tag: text
134+
text: 作者:
135+
- tag: a
136+
text: ${{ github.event.pull_request.user.login }}
137+
href: ${{ github.event.pull_request.user.html_url }}
138+
- - tag: text
139+
text: 指派:
140+
- tag: a
141+
text: ${{ github.event.pull_request.assignee.login }}
142+
href: ${{ github.event.pull_request.assignee.html_url }}
143+
- - tag: text
144+
text: "标签:${{ github.event.pull_request.labels }}"
145+
- - tag: text
146+
text: 里程碑:${{ github.event.pull_request.milestone.title }}
147+
- - tag: text
148+
text: 内容:
149+
- tag: text
150+
text: |
151+
${{ github.event.pull_request.body }}
152+
- name: PR edited
153+
uses: foxundermoon/feishu-action@v2
154+
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')
155+
with:
156+
url: ${{ secrets.LARK_CHATBOT_HOOK_URL }}
157+
msg_type: post
158+
content: |
159+
post:
160+
zh_cn:
161+
title: GitHub PR 编辑:${{ github.event.pull_request.title }}
162+
content:
163+
- - tag: text
164+
text: 链接:
165+
- tag: a
166+
text: ${{ github.event.pull_request.html_url }}
167+
href: ${{ github.event.pull_request.html_url }}
168+
- - tag: text
169+
text: 作者:
170+
- tag: a
171+
text: ${{ github.event.pull_request.user.login }}
172+
href: ${{ github.event.pull_request.user.html_url }}
173+
- - tag: text
174+
text: 指派:
175+
- tag: a
176+
text: ${{ github.event.pull_request.assignee.login }}
177+
href: ${{ github.event.pull_request.assignee.html_url }}
178+
- - tag: text
179+
text: "标签:${{ github.event.pull_request.labels }}"
180+
- - tag: text
181+
text: 里程碑:${{ github.event.pull_request.milestone.title }}
182+
- - tag: text
183+
text: 内容:
184+
- tag: text
185+
text: |
186+
${{ github.event.pull_request.body }}
187+
- name: PR closed
188+
uses: foxundermoon/feishu-action@v2
189+
if: github.event_name == 'pull_request' && github.event.action == 'closed'
190+
with:
191+
url: ${{ secrets.LARK_CHATBOT_HOOK_URL }}
192+
msg_type: post
193+
content: |
194+
post:
195+
zh_cn:
196+
title: GitHub PR 关闭:${{ github.event.pull_request.title }}
197+
content:
198+
- - tag: text
199+
text: 链接:
200+
- tag: a
201+
text: ${{ github.event.pull_request.html_url }}
202+
href: ${{ github.event.pull_request.html_url }}
203+
- - tag: text
204+
text: 作者:
205+
- tag: a
206+
text: ${{ github.event.pull_request.user.login }}
207+
href: ${{ github.event.pull_request.user.html_url }}
208+
- - tag: text
209+
text: 指派:
210+
- tag: a
211+
text: ${{ github.event.pull_request.assignee.login }}
212+
href: ${{ github.event.pull_request.assignee.html_url }}
213+
- - tag: text
214+
text: "标签:${{ github.event.pull_request.labels }}"
215+
- - tag: text
216+
text: 里程碑:${{ github.event.pull_request.milestone.title }}
217+
- - tag: text
218+
text: 内容:
219+
- tag: text
220+
text: |
221+
${{ github.event.pull_request.body }}
222+
- name: Issue commented
223+
uses: foxundermoon/feishu-action@v2
224+
if: github.event_name == 'issue_comment' && (github.event.action == 'created' || github.event.action == 'edited')
225+
with:
226+
url: ${{ secrets.LARK_CHATBOT_HOOK_URL }}
227+
msg_type: post
228+
content: |
229+
post:
230+
zh_cn:
231+
title: GitHub issue 评论:${{ github.event.issue.title }}
232+
content:
233+
- - tag: text
234+
text: 链接:
235+
- tag: a
236+
text: ${{ github.event.comment.html_url }}
237+
href: ${{ github.event.comment.html_url }}
238+
- - tag: text
239+
text: 作者:
240+
- tag: a
241+
text: ${{ github.event.comment.user.login }}
242+
href: ${{ github.event.comment.user.html_url }}
243+
- - tag: text
244+
text: 内容:
245+
- tag: text
246+
text: |
247+
${{ github.event.comment.body }}

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"dependencies": {
1313
"@koa/cors": "^5.0.0",
1414
"@koa/multer": "^3.0.2",
15-
"@koa/router": "^13.0.0",
15+
"@koa/router": "^13.1.0",
1616
"class-transformer": "^0.5.1",
1717
"class-validator": "^0.14.1",
1818
"cross-env": "^7.0.3",
@@ -28,34 +28,34 @@
2828
"marked": "^14.1.2",
2929
"mobx-github": "^0.3.4",
3030
"mobx-restful": "^1.0.1",
31-
"pg": "^8.12.0",
32-
"pg-connection-string": "^2.6.4",
31+
"pg": "^8.13.0",
32+
"pg-connection-string": "^2.7.0",
3333
"reflect-metadata": "^0.2.2",
3434
"routing-controllers": "^0.10.4",
3535
"routing-controllers-openapi": "^4.0.0",
3636
"tslib": "^2.7.0",
37-
"typeorm": "npm:@helveg/typeorm@^0.3.20",
37+
"typeorm": "npm:@helveg/typeorm@^0.3.21",
3838
"undici": "^6.19.8",
3939
"web-utility": "^4.4.0"
4040
},
4141
"devDependencies": {
42-
"@types/jest": "^29.5.12",
43-
"@types/jsonwebtoken": "^9.0.6",
42+
"@types/jest": "^29.5.13",
43+
"@types/jsonwebtoken": "^9.0.7",
4444
"@types/koa": "^2.15.0",
4545
"@types/koa-logger": "^3.1.5",
46-
"@types/node": "^20.16.5",
47-
"@typescript-eslint/eslint-plugin": "^8.5.0",
48-
"@typescript-eslint/parser": "^8.5.0",
49-
"eslint": "^8.57.0",
46+
"@types/node": "^20.16.10",
47+
"@typescript-eslint/eslint-plugin": "^8.8.0",
48+
"@typescript-eslint/parser": "^8.8.0",
49+
"eslint": "^8.57.1",
5050
"eslint-plugin-simple-import-sort": "^12.1.1",
5151
"get-git-folder": "^0.1.2",
52-
"husky": "^9.1.5",
52+
"husky": "^9.1.6",
5353
"jest": "^29.7.0",
5454
"koajax": "^3.0.2",
5555
"lint-staged": "^15.2.10",
5656
"prettier": "^3.3.3",
5757
"sqlite3": "^5.1.7",
58-
"start-server-and-test": "^2.0.7",
58+
"start-server-and-test": "^2.0.8",
5959
"swagger-typescript-api": "^13.0.22",
6060
"ts-jest": "^29.2.5",
6161
"ts-node": "^10.9.2",

0 commit comments

Comments
 (0)