File tree Expand file tree Collapse file tree 2 files changed +51
-1
lines changed Expand file tree Collapse file tree 2 files changed +51
-1
lines changed Original file line number Diff line number Diff line change 1
1
# ospp-cr-bot
2
-
3
2
开源之夏 - 一种通用的 Code Review 机器人
4
3
5
4
## 背景
@@ -147,3 +146,54 @@ scheduler:
147
146
- [ ] 后续支持
148
147
- [ ] Slack 支持
149
148
- [ ] GitLab 支持
149
+ =======
150
+ ## How to Build
151
+
152
+ ` ` ` bash
153
+ go mod tidy
154
+ go build ./cmd/main.go
155
+ ```
156
+
157
+ ## How to Run
158
+
159
+ ``` bash
160
+ ./main
161
+ ```
162
+
163
+ ## How to Use
164
+
165
+ 首先,请确保你已阅读过飞书开放平台文档并创建好你的应用。
166
+
167
+ 参考:[ https://open.feishu.cn/document/ukTMukTMukTM/uITNz4iM1MjLyUzM ] ( https://open.feishu.cn/document/ukTMukTMukTM/uITNz4iM1MjLyUzM )
168
+
169
+ 在项目根目录下创建 ` .env ` 文件,并填入如下内容:
170
+
171
+ ```
172
+ LarkAppId=cli_a2f1d921fbxxxxxx
173
+ LarkAppSecret=Ss4kqZbQxhujO3BsIHcQZb3lDkxxxxxx
174
+ VerificationToken=6mLPrm022g3IrQcF8RUSLgVJ2txxxxxx
175
+ EncryptKey=xxx
176
+ ```
177
+
178
+ 程序会自动读取当前目录下的 ` common.yaml ` 文件。通常该文件的结构如下
179
+
180
+ ``` yaml
181
+ tasks :
182
+ - name : " Task 1" // 名称
183
+ repo : lyleshaw/go-best-practice // 仓库地址
184
+ repoType : github // 仓库类型,可选值:github, gitlab
185
+ recevier : oc_a0553eda9014c201e6969b478895c230 // 接收人的飞书 ID,如何获取见下
186
+ recevierType : group // 接收人类型,可选值:group, user
187
+ pushChannel : lark // 推送渠道,可选值:lark, slack
188
+ - name : " Task 2"
189
+ repo : xxx/xxx
190
+ ` ` `
191
+
192
+ 请根据需求自定义上述参数。
193
+
194
+ ## How to Get My Lark ID
195
+
196
+ 请在启动服务后,拉入群聊并 @cr-bot-test,bot 会获取你的 Lark ID 并回复。
197
+
198
+ 
199
+ 
You can’t perform that action at this time.
0 commit comments