Files
OpenList/CONTRIBUTING.md

78 lines
1.9 KiB
Markdown
Raw Normal View History

2022-03-06 20:30:17 +08:00
# Contributing
## Setup your machine
`OpenList` is written in [Go](https://golang.org/) and [SolidJS](https://www.solidjs.com/).
2022-03-06 20:30:17 +08:00
Prerequisites:
- [git](https://git-scm.com)
- [Go 1.24+](https://golang.org/doc/install)
2022-03-06 20:30:17 +08:00
- [gcc](https://gcc.gnu.org/)
- [nodejs](https://nodejs.org/)
## Cloning a fork
Fork and clone `OpenList` and `OpenList-Frontend` anywhere:
2022-03-06 20:30:17 +08:00
```shell
$ git clone https://github.com/<your-username>/OpenList.git
$ git clone --recurse-submodules https://github.com/<your-username>/OpenList-Frontend.git
```
## Creating a branch
Create a new branch from the `main` branch, with an appropriate name.
```shell
$ git checkout -b <branch-name>
2022-03-06 20:30:17 +08:00
```
## Preview your change
2022-03-06 20:30:17 +08:00
### backend
2022-03-06 20:30:17 +08:00
```shell
2022-08-17 14:02:05 +08:00
$ go run main.go
2022-03-06 20:30:17 +08:00
```
2022-03-06 20:30:17 +08:00
### frontend
2022-03-06 20:30:17 +08:00
```shell
2022-08-17 14:02:05 +08:00
$ pnpm dev
2022-03-06 20:30:17 +08:00
```
2022-08-31 20:46:19 +08:00
## Add a new driver
2022-08-31 20:46:19 +08:00
Copy `drivers/template` folder and rename it, and follow the comments in it.
2022-03-06 20:30:17 +08:00
## Create a commit
Commit messages should be well formatted, and to make that "standardized".
Submit your pull request. For PR titles, follow [Conventional Commits](https://www.conventionalcommits.org).
2022-03-06 20:30:17 +08:00
https://github.com/OpenListTeam/OpenList/issues/376
2022-03-06 20:30:17 +08:00
It's suggested to sign your commits. See: [How to sign commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits)
2022-03-06 20:30:17 +08:00
## Submit a pull request
2022-03-06 20:30:17 +08:00
Please make sure your code has been formatted with `go fmt` or [prettier](https://prettier.io/) before submitting.
2022-03-06 20:30:17 +08:00
Push your branch to your `openlist` fork and open a pull request against the `main` branch.
2022-03-06 20:30:17 +08:00
## Merge your pull request
2022-03-06 20:30:17 +08:00
Your pull request will be merged after review. Please wait for the maintainer to merge your pull request after review.
2022-03-06 20:30:17 +08:00
At least 1 approving review is required by reviewers with write access. You can also request a review from maintainers.
2022-03-06 20:30:17 +08:00
## Delete your branch
2022-03-06 20:30:17 +08:00
(Optional) After your pull request is merged, you can delete your branch.
2022-03-06 20:30:17 +08:00
---
2022-03-06 20:30:17 +08:00
Thank you for your contribution! Let's make OpenList better together!