From 0c27b4bd47cd1176af03d09553b4bd361a4894d7 Mon Sep 17 00:00:00 2001 From: MadDogOwner Date: Sun, 24 Aug 2025 20:13:11 +0800 Subject: [PATCH] docs(contributing): update guidelines (#983) [skip ci] * docs(contributing): update guidelines * docs(contributing): clarify fork * docs(contributing): sync translation Co-authored-by: Yinan Qin <39023210+elysia-best@users.noreply.github.com> Signed-off-by: MadDogOwner * 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 Co-authored-by: Yinan Qin <39023210+elysia-best@users.noreply.github.com> --- .github/PULL_REQUEST_TEMPLATE.md | 56 ++++++++++++++++ CONTRIBUTING.md | 110 +++++++++++-------------------- 2 files changed, 96 insertions(+), 70 deletions(-) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..e74e5963 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,56 @@ + + + +## Description / 描述 + + + + +## Motivation and Context / 背景 + + + + + + + +Closes #XXXX + + + + +Relates to #XXXX + +## How Has This Been Tested? / 测试 + + + + +## Checklist / 检查清单 + + + + + + + +- [ ] I have read the [CONTRIBUTING](https://github.com/OpenListTeam/OpenList/blob/main/CONTRIBUTING.md) document. + 我已阅读 [CONTRIBUTING](https://github.com/OpenListTeam/OpenList/blob/main/CONTRIBUTING.md) 文档。 +- [ ] I have formatted my code with `go fmt` or [prettier](https://prettier.io/). + 我已使用 `go fmt` 或 [prettier](https://prettier.io/) 格式化提交的代码。 +- [ ] I have added appropriate labels to this PR (or mentioned needed labels in the description if lacking permissions). + 我已为此 PR 添加了适当的标签(如无权限或需要的标签不存在,请在描述中说明,管理员将后续处理)。 +- [ ] I have requested review from relevant code authors using the "Request review" feature when applicable. + 我已在适当情况下使用"Request review"功能请求相关代码作者进行审查。 +- [ ] I have updated the repository accordingly (If it’s needed). + 我已相应更新了相关仓库(若适用)。 + - [ ] [OpenList-Frontend](https://github.com/OpenListTeam/OpenList-Frontend) #XXXX + - [ ] [OpenList-Docs](https://github.com/OpenListTeam/OpenList-Docs) #XXXX diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c8ce47b2..6064b03c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,106 +2,76 @@ ## Setup your machine -`OpenList` is written in [Go](https://golang.org/) and [React](https://reactjs.org/). +`OpenList` is written in [Go](https://golang.org/) and [SolidJS](https://www.solidjs.com/). Prerequisites: - [git](https://git-scm.com) -- [Go 1.20+](https://golang.org/doc/install) +- [Go 1.24+](https://golang.org/doc/install) - [gcc](https://gcc.gnu.org/) - [nodejs](https://nodejs.org/) -Clone `OpenList` and `OpenList-Frontend` anywhere: +## Cloning a fork + +Fork and clone `OpenList` and `OpenList-Frontend` anywhere: ```shell -$ git clone https://github.com/OpenListTeam/OpenList.git -$ git clone --recurse-submodules https://github.com/OpenListTeam/OpenList-Frontend.git +$ git clone https://github.com//OpenList.git +$ git clone --recurse-submodules https://github.com//OpenList-Frontend.git +``` + +## Creating a branch + +Create a new branch from the `main` branch, with an appropriate name. + +```shell +$ git checkout -b ``` -You should switch to the `main` branch for development. ## Preview your change + ### backend + ```shell $ go run main.go ``` + ### frontend + ```shell $ pnpm dev ``` ## Add a new driver + Copy `drivers/template` folder and rename it, and follow the comments in it. ## Create a commit Commit messages should be well formatted, and to make that "standardized". -### Commit Message Format -Each commit message consists of a **header**, a **body** and a **footer**. The header has a special -format that includes a **type**, a **scope** and a **subject**: +Submit your pull request. For PR titles, follow [Conventional Commits](https://www.conventionalcommits.org). -``` -(): - - - -