|
2 | 2 |
|
3 | 3 | ## Setup your machine |
4 | 4 |
|
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/). |
6 | 6 |
|
7 | 7 | Prerequisites: |
8 | 8 |
|
9 | 9 | - [git](https://git-scm.com) |
10 | | -- [Go 1.20+](https://golang.org/doc/install) |
| 10 | +- [Go 1.24+](https://golang.org/doc/install) |
11 | 11 | - [gcc](https://gcc.gnu.org/) |
12 | 12 | - [nodejs](https://nodejs.org/) |
13 | 13 |
|
14 | | -Clone `OpenList` and `OpenList-Frontend` anywhere: |
| 14 | +## Cloning a fork |
| 15 | + |
| 16 | +Fork and clone `OpenList` and `OpenList-Frontend` anywhere: |
15 | 17 |
|
16 | 18 | ```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> |
19 | 29 | ``` |
20 | | -You should switch to the `main` branch for development. |
21 | 30 |
|
22 | 31 | ## Preview your change |
| 32 | + |
23 | 33 | ### backend |
| 34 | + |
24 | 35 | ```shell |
25 | 36 | $ go run main.go |
26 | 37 | ``` |
| 38 | + |
27 | 39 | ### frontend |
| 40 | + |
28 | 41 | ```shell |
29 | 42 | $ pnpm dev |
30 | 43 | ``` |
31 | 44 |
|
32 | 45 | ## Add a new driver |
| 46 | + |
33 | 47 | Copy `drivers/template` folder and rename it, and follow the comments in it. |
34 | 48 |
|
35 | 49 | ## Create a commit |
36 | 50 |
|
37 | 51 | Commit messages should be well formatted, and to make that "standardized". |
38 | 52 |
|
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). |
50 | 54 |
|
51 | | -The **header** is mandatory and the **scope** of the header is optional. |
| 55 | +https://github.com/OpenListTeam/OpenList/issues/376 |
52 | 56 |
|
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) |
55 | 58 |
|
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 |
79 | 60 |
|
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. |
83 | 62 |
|
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. |
85 | 64 |
|
86 | | -### Subject |
87 | | -The subject contains succinct description of the change: |
| 65 | +## Merge your pull request |
88 | 66 |
|
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. |
92 | 68 |
|
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. |
96 | 70 |
|
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 |
100 | 72 |
|
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. |
103 | 74 |
|
104 | | -## Submit a pull request |
| 75 | +--- |
105 | 76 |
|
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