Skip to content

Commit 09a7497

Browse files
authored
Merge pull request #51 from MacroMeng/master
docs: 拆分CONTRIBUTING.md并优化内容
2 parents 9ecf8c7 + d05aa46 commit 09a7497

2 files changed

Lines changed: 89 additions & 87 deletions

File tree

CONTRIBUTING.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# 📖 GitHub 提交与贡献教程
2+
3+
## 🚀 快速开始
4+
5+
在向 SecRandom 项目贡献代码之前,请确保您已完成以下准备工作:
6+
7+
> 除了使用命令行,您还可以使用 GitHub Desktop 或您 IDE 中的内置功能/插件进行操作。
8+
9+
1. **Fork 项目**
10+
- 访问 [SecRandom GitHub 仓库](https://github.com/SECTL/SecRandom)
11+
- 点击右上角的 "Fork" 按钮创建您自己的仓库副本
12+
13+
2. **克隆仓库**
14+
15+
```bash
16+
git clone https://github.com/您的用户名/SecRandom.git
17+
cd SecRandom
18+
```
19+
20+
3. **添加上游仓库**
21+
22+
```bash
23+
git remote add upstream https://github.com/SECTL/SecRandom.git
24+
```
25+
26+
## 📤 提交您的贡献
27+
28+
1. **创建功能分支**
29+
30+
```bash
31+
git checkout -b feature/您的功能名称
32+
```
33+
34+
2. **进行修改**
35+
- 编写您的代码
36+
- 添加必要的注释(请使用中文)
37+
- 确保遵循项目代码规范
38+
39+
3. **提交更改**
40+
41+
```bash
42+
git add .
43+
git commit -m "描述您的更改内容"
44+
```
45+
46+
4. **同步上游更改**
47+
48+
```bash
49+
git fetch upstream
50+
git rebase upstream/master
51+
```
52+
53+
5. **推送并创建 Pull Request**
54+
55+
```bash
56+
git push origin feature/您的功能名称
57+
```
58+
59+
- 访问您的 GitHub 仓库
60+
- 点击 "Compare & pull request" 按钮
61+
- 填写 PR 描述并提交
62+
63+
## 📋 贡献指南
64+
65+
### 代码规范
66+
67+
- 使用中文编写代码注释
68+
- 遵循项目现有的代码风格
69+
- 确保导入所有使用的 Qt 类,不要使用 `from spam import *` 导入。
70+
- 验证第三方 UI 组件是否存在
71+
72+
> [!TIP]
73+
> 您可以使用 **PyRight****Ruff** 等工具检查代码是否符合规范。
74+
75+
### 提交信息规范
76+
77+
- 使用清晰、简洁的提交信息
78+
- 以动词开头(如:添加、修复、更新等)
79+
- 避免过于简单的描述(如:"修复bug")
80+
81+
> [!TIP]
82+
> 我们推荐使用[约定式提交](https://www.conventionalcommits.org/zh-hans/v1.0.0/)撰写提交信息。
83+
84+
### Pull Request 要求
85+
86+
- PR 标题应简洁明了地描述更改内容
87+
- 提供详细的更改说明
88+
- 确保所有测试通过
89+
- 关联相关的 Issue(如有)

README.md

Lines changed: 0 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -156,93 +156,6 @@
156156
<img alt="Star History" src="https://api.star-history.com/svg?repos=SECTL/SecRandom&type=Date">
157157
</picture>
158158

159-
## 📖 GitHub 提交与贡献教程
160-
161-
<details>
162-
<summary>点击查看详情</summary>
163-
164-
### 🚀 快速开始
165-
166-
在向 SecRandom 项目贡献代码之前,请确保您已完成以下准备工作:
167-
168-
1. **Fork 项目**
169-
- 访问 [SecRandom GitHub 仓库](https://github.com/SECTL/SecRandom)
170-
- 点击右上角的 "Fork" 按钮创建您自己的仓库副本
171-
172-
2. **克隆仓库**
173-
174-
```bash
175-
git clone https://github.com/您的用户名/SecRandom.git
176-
cd SecRandom
177-
```
178-
179-
3. **添加上游仓库**
180-
181-
```bash
182-
git remote add upstream https://github.com/SECTL/SecRandom.git
183-
```
184-
185-
### 📤 提交您的贡献
186-
187-
1. **创建功能分支**
188-
189-
```bash
190-
git checkout -b feature/您的功能名称
191-
```
192-
193-
2. **进行修改**
194-
- 编写您的代码
195-
- 添加必要的注释(请使用中文)
196-
- 确保遵循项目代码规范
197-
198-
3. **提交更改**
199-
200-
```bash
201-
git add .
202-
git commit -m "描述您的更改内容"
203-
```
204-
205-
4. **同步上游更改**
206-
207-
```bash
208-
git fetch upstream
209-
git rebase upstream/master
210-
```
211-
212-
5. **推送并创建 Pull Request**
213-
214-
```bash
215-
git push origin feature/您的功能名称
216-
```
217-
218-
- 访问您的 GitHub 仓库
219-
- 点击 "Compare & pull request" 按钮
220-
- 填写 PR 描述并提交
221-
222-
### 📋 贡献指南
223-
224-
#### 代码规范
225-
226-
- 使用中文编写代码注释
227-
- 遵循项目现有的代码风格
228-
- 确保导入所有使用的 Qt 类
229-
- 验证第三方 UI 组件是否存在
230-
231-
#### 提交信息规范
232-
233-
- 使用清晰、简洁的提交信息
234-
- 以动词开头(如:添加、修复、更新等)
235-
- 避免过于简单的描述(如:"修复bug")
236-
237-
#### Pull Request 要求
238-
239-
- PR 标题应简洁明了地描述更改内容
240-
- 提供详细的更改说明
241-
- 确保所有测试通过
242-
- 关联相关的 Issue(如有)
243-
244-
</details>
245-
246159
## 📖 使用教程
247160

248161
### 🚀 GitHub Actions 统一构建工作流使用指南

0 commit comments

Comments
 (0)