Skip to content

Commit 6facf2a

Browse files
authored
Merge pull request #5 from lyleshaw/feat/add-docs
[Docs] add docs
2 parents 73d0c80 + c9e7432 commit 6facf2a

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed

README.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,53 @@
11
# ospp-cr-bot
2-
32
开源之夏 - 一种通用的 Code Review 机器人
3+
4+
## How to Build
5+
6+
```bash
7+
go mod tidy
8+
go build ./cmd/main.go
9+
```
10+
11+
## How to Run
12+
13+
```bash
14+
./main
15+
```
16+
17+
## How to Use
18+
19+
首先,请确保你已阅读过飞书开放平台文档并创建好你的应用。
20+
21+
参考:[https://open.feishu.cn/document/ukTMukTMukTM/uITNz4iM1MjLyUzM](https://open.feishu.cn/document/ukTMukTMukTM/uITNz4iM1MjLyUzM)
22+
23+
在项目根目录下创建 `.env` 文件,并填入如下内容:
24+
25+
```
26+
LarkAppId=cli_a2f1d921fbxxxxxx
27+
LarkAppSecret=Ss4kqZbQxhujO3BsIHcQZb3lDkxxxxxx
28+
VerificationToken=6mLPrm022g3IrQcF8RUSLgVJ2txxxxxx
29+
EncryptKey=xxx
30+
```
31+
32+
程序会自动读取当前目录下的 `common.yaml` 文件。通常该文件的结构如下
33+
34+
```yaml
35+
tasks:
36+
- name: "Task 1" // 名称
37+
repo: lyleshaw/go-best-practice // 仓库地址
38+
repoType: github // 仓库类型,可选值:github, gitlab
39+
recevier: oc_a0553eda9014c201e6969b478895c230 // 接收人的飞书 ID,如何获取见下
40+
recevierType: group // 接收人类型,可选值:group, user
41+
pushChannel: lark // 推送渠道,可选值:lark, slack
42+
- name: "Task 2"
43+
repo: xxx/xxx
44+
```
45+
46+
请根据需求自定义上述参数。
47+
48+
## How to Get My Lark ID
49+
50+
请在启动服务后,拉入群聊并 @cr-bot-test,bot 会获取你的 Lark ID 并回复。
51+
52+
![img.png](docs/imgs/img.png)
53+
![img.png](img.png)

img.png

19.8 KB
Loading

0 commit comments

Comments
 (0)