Skip to content

Commit 0c27b4b

Browse files
xrgzselysia-best
andauthored
docs(contributing): update guidelines (#983)
[skip ci] * docs(contributing): update guidelines * docs(contributing): clarify fork * docs(contributing): sync translation Co-authored-by: Yinan Qin <[email protected]> Signed-off-by: MadDogOwner <[email protected]> * docs(contributing): add label and cc reminder * docs(contributing): remove ensure new branch from checklist * docs(contributing): replace generic GitHub URLs with user-specific ones * docs(contributing): make branch deletion after PR merge optional * docs(contributing): keep --recurse-submodules --------- Signed-off-by: MadDogOwner <[email protected]> Co-authored-by: Yinan Qin <[email protected]>
1 parent 736cd9e commit 0c27b4b

File tree

2 files changed

+89
-63
lines changed

2 files changed

+89
-63
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<!--
2+
Provide a general summary of your changes in the Title above.
3+
The PR title must start with `feat(): `, `docs(): `, `fix(): `, `style(): `, or `refactor(): `, `chore(): `. For example: `feat(component): add new feature`.
4+
If it spans multiple components, use the main component as the prefix and enumerate in the title, describe in the body.
5+
-->
6+
<!--
7+
在上方标题中提供您更改的总体摘要。
8+
PR 标题需以 `feat(): `, `docs(): `, `fix(): `, `style(): `, `refactor(): `, `chore(): ` 其中之一开头,例如:`feat(component): 新增功能`。
9+
如果跨多个组件,请使用主要组件作为前缀,并在标题中枚举、描述中说明。
10+
-->
11+
12+
## Description / 描述
13+
14+
<!-- Describe your changes in detail -->
15+
<!-- 详细描述您的更改 -->
16+
17+
## Motivation and Context / 背景
18+
19+
<!-- Why is this change required? What problem does it solve? -->
20+
<!-- 为什么需要此更改?它解决了什么问题? -->
21+
22+
<!-- If it fixes an open issue, please link to the issue here. -->
23+
<!-- 如果修复了一个打开的issue,请在此处链接到该issue -->
24+
25+
Closes #XXXX
26+
27+
<!-- or -->
28+
<!-- 或者 -->
29+
30+
Relates to #XXXX
31+
32+
## How Has This Been Tested? / 测试
33+
34+
<!-- Please describe in detail how you tested your changes. -->
35+
<!-- 请详细描述您如何测试更改 -->
36+
37+
## Checklist / 检查清单
38+
39+
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
40+
<!-- 检查以下所有要点,并在所有适用的框中打`x` -->
41+
42+
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
43+
<!-- 如果您对其中任何一项不确定,请不要犹豫提问。我们会帮助您! -->
44+
45+
- [ ] I have read the [CONTRIBUTING](https://github.com/OpenListTeam/OpenList/blob/main/CONTRIBUTING.md) document.
46+
我已阅读 [CONTRIBUTING](https://github.com/OpenListTeam/OpenList/blob/main/CONTRIBUTING.md) 文档。
47+
- [ ] I have formatted my code with `go fmt` or [prettier](https://prettier.io/).
48+
我已使用 `go fmt`[prettier](https://prettier.io/) 格式化提交的代码。
49+
- [ ] I have added appropriate labels to this PR (or mentioned needed labels in the description if lacking permissions).
50+
我已为此 PR 添加了适当的标签(如无权限或需要的标签不存在,请在描述中说明,管理员将后续处理)。
51+
- [ ] I have requested review from relevant code authors using the "Request review" feature when applicable.
52+
我已在适当情况下使用"Request review"功能请求相关代码作者进行审查。
53+
- [ ] I have updated the repository accordingly (If it’s needed).
54+
我已相应更新了相关仓库(若适用)。
55+
- [ ] [OpenList-Frontend](https://github.com/OpenListTeam/OpenList-Frontend) #XXXX
56+
- [ ] [OpenList-Docs](https://github.com/OpenListTeam/OpenList-Docs) #XXXX

CONTRIBUTING.md

Lines changed: 33 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -2,106 +2,76 @@
22

33
## Setup your machine
44

5-
`OpenList` is written in [Go](https://golang.org/) and [React](https://reactjs.org/).
5+
`OpenList` is written in [Go](https://golang.org/) and [SolidJS](https://www.solidjs.com/).
66

77
Prerequisites:
88

99
- [git](https://git-scm.com)
10-
- [Go 1.20+](https://golang.org/doc/install)
10+
- [Go 1.24+](https://golang.org/doc/install)
1111
- [gcc](https://gcc.gnu.org/)
1212
- [nodejs](https://nodejs.org/)
1313

14-
Clone `OpenList` and `OpenList-Frontend` anywhere:
14+
## Cloning a fork
15+
16+
Fork and clone `OpenList` and `OpenList-Frontend` anywhere:
1517

1618
```shell
17-
$ git clone https://github.com/OpenListTeam/OpenList.git
18-
$ git clone --recurse-submodules https://github.com/OpenListTeam/OpenList-Frontend.git
19+
$ git clone https://github.com/<your-username>/OpenList.git
20+
$ git clone --recurse-submodules https://github.com/<your-username>/OpenList-Frontend.git
21+
```
22+
23+
## Creating a branch
24+
25+
Create a new branch from the `main` branch, with an appropriate name.
26+
27+
```shell
28+
$ git checkout -b <branch-name>
1929
```
20-
You should switch to the `main` branch for development.
2130

2231
## Preview your change
32+
2333
### backend
34+
2435
```shell
2536
$ go run main.go
2637
```
38+
2739
### frontend
40+
2841
```shell
2942
$ pnpm dev
3043
```
3144

3245
## Add a new driver
46+
3347
Copy `drivers/template` folder and rename it, and follow the comments in it.
3448

3549
## Create a commit
3650

3751
Commit messages should be well formatted, and to make that "standardized".
3852

39-
### Commit Message Format
40-
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
41-
format that includes a **type**, a **scope** and a **subject**:
42-
43-
```
44-
<type>(<scope>): <subject>
45-
<BLANK LINE>
46-
<body>
47-
<BLANK LINE>
48-
<footer>
49-
```
53+
Submit your pull request. For PR titles, follow [Conventional Commits](https://www.conventionalcommits.org).
5054

51-
The **header** is mandatory and the **scope** of the header is optional.
55+
https://github.com/OpenListTeam/OpenList/issues/376
5256

53-
Any line of the commit message cannot be longer than 100 characters! This allows the message to be easier
54-
to read on GitHub as well as in various git tools.
57+
It's suggested to sign your commits. See: [How to sign commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits)
5558

56-
### Revert
57-
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header
58-
of the reverted commit.
59-
In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit
60-
being reverted.
61-
62-
### Type
63-
Must be one of the following:
64-
65-
* **feat**: A new feature
66-
* **fix**: A bug fix
67-
* **docs**: Documentation only changes
68-
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
69-
semi-colons, etc)
70-
* **refactor**: A code change that neither fixes a bug nor adds a feature
71-
* **perf**: A code change that improves performance
72-
* **test**: Adding missing or correcting existing tests
73-
* **build**: Affects project builds or dependency modifications
74-
* **revert**: Restore the previous commit
75-
* **ci**: Continuous integration of related file modifications
76-
* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation
77-
generation
78-
* **release**: Release a new version
59+
## Submit a pull request
7960

80-
### Scope
81-
The scope could be anything specifying place of the commit change. For example `$location`,
82-
`$browser`, `$compile`, `$rootScope`, `ngHref`, `ngClick`, `ngView`, etc...
61+
Please make sure your code has been formatted with `go fmt` or [prettier](https://prettier.io/) before submitting.
8362

84-
You can use `*` when the change affects more than a single scope.
63+
Push your branch to your `openlist` fork and open a pull request against the `main` branch.
8564

86-
### Subject
87-
The subject contains succinct description of the change:
65+
## Merge your pull request
8866

89-
* use the imperative, present tense: "change" not "changed" nor "changes"
90-
* don't capitalize first letter
91-
* no dot (.) at the end
67+
Your pull request will be merged after review. Please wait for the maintainer to merge your pull request after review.
9268

93-
### Body
94-
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
95-
The body should include the motivation for the change and contrast this with previous behavior.
69+
At least 1 approving review is required by reviewers with write access. You can also request a review from maintainers.
9670

97-
### Footer
98-
The footer should contain any information about **Breaking Changes** and is also the place to
99-
[reference GitHub issues that this commit closes](https://help.github.com/articles/closing-issues-via-commit-messages/).
71+
## Delete your branch
10072

101-
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines.
102-
The rest of the commit message is then used for this.
73+
(Optional) After your pull request is merged, you can delete your branch.
10374

104-
## Submit a pull request
75+
---
10576

106-
Push your branch to your `openlist` fork and open a pull request against the
107-
`main` branch.
77+
Thank you for your contribution! Let's make OpenList better together!

0 commit comments

Comments
 (0)