Skip to content

Commit 714cb2c

Browse files
committed
chore: creat contributing.md
1 parent 97eb8f4 commit 714cb2c

4 files changed

Lines changed: 98 additions & 2 deletions

File tree

doc/contribute.md

Whitespace-only changes.

docs/contributing.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Welcome to Userscripts contributing guide
2+
3+
Thank you for investing your time in contributing to this open source project!
4+
5+
We hope this guide will helps you understand how to contribute to this project.
6+
7+
For development and build environments please refer to [this document](dev.md).
8+
9+
# Branches
10+
11+
### `master`: default branch
12+
- corresponding to development channel
13+
- all development work around this branch
14+
- protected branches not accept commits
15+
- all work will be done in sub-branches
16+
- all sub-branches will be merged via PRs
17+
18+
### `beta`: latest test version
19+
- generated from the master branch
20+
- corresponding to TestFlight channel
21+
- only accept version number commits
22+
- hotfixes and PRs are not accepted
23+
- never merge back into master branch
24+
25+
### `release`: latest public version
26+
- generated from the beta branch
27+
- generate GitHub Releases and Tags
28+
- corresponding to App Store channel
29+
- accept hotfixes and version commits
30+
- always merge back into master branch
31+
32+
# Commits
33+
### Please use semantic commit messages
34+
35+
Format: `<type>(<scope>): <subject>`
36+
37+
`<scope>` is optional
38+
39+
### Example
40+
41+
```
42+
feat: add hat wobble
43+
^--^ ^------------^
44+
| |
45+
| +-> Summary in present tense.
46+
|
47+
+-------> Type: chore, docs, feat, fix, refactor, style, or test.
48+
```
49+
50+
More Examples:
51+
52+
- `feat`: (new feature for the user, not a new feature for build script)
53+
- `fix`: (bug fix for the user, not a fix to a build script)
54+
- `docs`: (changes to the documentation)
55+
- `style`: (formatting, missing semi colons, etc; no production code change)
56+
- `refactor`: (refactoring production code, eg. renaming a variable)
57+
- `test`: (adding missing tests, refactoring tests; no production code change)
58+
- `chore`: (updating grunt tasks etc; no production code change)
59+
60+
[References](https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716)
61+
62+
# Pull requests
63+
64+
Almost all features and fixes will be merged into the master branch via pull requests (PRs).
65+
66+
We will improve the guidelines for creating PRs in the future, like creat [`pull request template`](https://docs.github.com/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository).
67+
68+
# Workflow
69+
70+
If you are not a member of the project, first you need to fork the master branch of the repository.
71+
72+
### General development
73+
- create a new branch from the master branch
74+
- suggested branch naming format like:
75+
- `issue/333`
76+
- `feat/...`
77+
- `fix/...`
78+
- complete your commits in this new branch
79+
- create a pull request from this new branch
80+
- wait for other maintainers to review your changes
81+
- pull request will be merged into master branch
82+
83+
### Generate beta version
84+
85+
- All completed features and fixes get into beta as soon as possible so that they get the maximum testing cycle time.
86+
- Beta releases use build numbers incremented, version numbers always use the next major release.
87+
- Bugs found and reported during testing are still fixed around the master branch and will be introduced in the rolling beta build.
88+
89+
### Generate public version
90+
91+
- When the series of betas has stabilized, we can produce a public release.
92+
- If necessary, we can delay merging PRs of new features into the master branch, give priority to fixing bugs found in the beta version, and ensure the stability of the public version as much as possible.
93+
- Despite various tests, we may still find bugs through user feedback in the public version, and we will fix those minor bugs through hotfixes.
94+
95+
# About
96+
[Userscripts](https://github.com/quoid/userscripts) @ 2022

doc/dev.md renamed to docs/dev.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The `xcode` directory is the root of the Xcode project where the Safari extensio
1717
- `xcodebuild` or build with Xcode App
1818

1919
# Contribute
20-
[Contribution Guidelines](contribute.md)
20+
[Contributing guide](contributing.md)
2121

2222
# About
23-
Userscripts @ 2022
23+
[Userscripts](https://github.com/quoid/userscripts) @ 2022
File renamed without changes.

0 commit comments

Comments
 (0)