Skip to content

Commit f6c7652

Browse files
committed
文档新增第一次贡献者注意事项
1 parent bcddac2 commit f6c7652

1 file changed

Lines changed: 49 additions & 2 deletions

File tree

doc/02-提交与贡献.md

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
! -------------------------------------------------------------
44
! Doc Type : Markdown
55
! Doc Name : 02-提交与贡献.md
6-
! Doc Authors : 曾奥然 <ccmywish@qq.com>
6+
! Doc Authors : @ccmywish
77
! Contributors : Nul None <nul@none.org>
88
! |
99
! Created On : <2024-12-13>
10-
! Last Modified : <2025-08-22>
10+
! Last Modified : <2026-03-25>
1111
! ---------------------------------------------------------- -->
1212

1313
# 贡献说明
@@ -20,6 +20,53 @@
2020

2121
<br>
2222

23+
24+
25+
## 第一次贡献者
26+
27+
### 注册身份信息
28+
29+
`src/chsrc-main.c``chsrc_register_contributors()` 函数里,在最后(我们按参与本项目的时间顺序排列)添加一行:
30+
31+
```c
32+
chef_register_contributor ("@ID: 你的GitHub/Gitee用户名或任意不与其他贡献者冲突的名字",
33+
"你的真实姓名",
34+
"你的邮箱地址",
35+
"若 chsrc ls <recipe> 的时候不想使用真实姓名,可以用这个参数的字符串来代替");
36+
```
37+
38+
39+
### 更新 Recipe 信息
40+
41+
在你修改的 recipe 文件的 `_prelude()` 函数里,需要做以下更新:
42+
43+
1. **更新 recipe 修改时间**(每次修改 recipe 代码都要更新):
44+
```c
45+
chef_set_recipe_last_updated (this, "YYYY-MM-DD");
46+
```
47+
48+
2. **更新镜像源信息时间**(仅当你修改了镜像源列表时才更新):
49+
```c
50+
chef_set_sources_last_updated (this, "YYYY-MM-DD");
51+
```
52+
53+
3. **将自己加入 `sauciers`**(次要贡献者列表,将计数加一并附上自己的 GitHub handle):
54+
```c
55+
// 原来是 0 个 saucier:
56+
chef_set_sauciers (this, 0);
57+
// 改为添加你自己:
58+
chef_set_sauciers (this, 1, "@你刚注册的ID");
59+
60+
// 原来已有 1 个 saucier:
61+
chef_set_sauciers (this, 1, "@Someone");
62+
// 改为添加你自己:
63+
chef_set_sauciers (this, 2, "@Someone", "@你刚注册的ID");
64+
```
65+
66+
<br>
67+
68+
69+
2370
## 提交与审阅
2471

2572
当你提交 PR 的时候,一定要将 PR 指定 chsrc 原仓库的 dev 分支。

0 commit comments

Comments
 (0)