Skip to content

Commit 6e202ed

Browse files
authored
Merge pull request #51 from easylogic/feature/update-readme
docs/update readme
2 parents ecd88bb + 13ead69 commit 6e202ed

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

docs/CONTRIBUTE.md

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Contribution Guide
2+
3+
Thank you for contributing to this project. Below is a detailed guide on the contribution process.
4+
5+
## Contribution Process
6+
7+
The following diagram shows the overall flow of the contribution process:
8+
9+
```mermaid
10+
graph TD
11+
A[Fork Repository] --> B[Create Branch]
12+
B --> C[Make Changes]
13+
C --> D[Commit Changes]
14+
D --> E[Push to Fork]
15+
E --> F[Create Pull Request]
16+
F --> G[Code Review]
17+
G --> H{Approved?}
18+
H -->|Yes| I[Merge to Release Branch]
19+
H -->|No| C
20+
I --> J[Close Pull Request]
21+
```
22+
23+
## Deployment
24+
25+
Release branch is deployed to production environment automatically when merged.
26+
27+
```mermaid
28+
graph TD
29+
A[Collect all changes in Release branch] --> B[Merge change version PR into Release branch]
30+
B --> C[Run 'Release to npm' GitHub action based on release branch]
31+
C --> D[Release completed]
32+
D --> E[Merge Release branch into Main branch]
33+
E --> F[Create new release branch based on current Main branch]
34+
F --> G[Create all subsequent PRs based on new release branch]
35+
G --> A
36+
```
37+
38+
- version PR: PR that updates the version in package.json
39+
- Use `pnpm changeset` to create a new version
40+
- `pnpm changeset` will create a new version PR based on the release branch
41+
- patch: bug fix
42+
- minor: new feature
43+
- major: breaking change
44+
45+
## Branch Naming
46+
47+
- `feature/*`: New feature development
48+
- `fix/*`: Bug fix
49+
- `chore/*`: Chore (refactoring, documentation, etc.)
50+
- `docs/*`: Documentation
51+
- `style/*`: Style (formatting, linting, etc.)
52+
- `refactor/*`: Refactoring (code improvement, no new feature or bug fix)
53+
- `test/*`: Testing
54+
- `ci/*`: CI/CD (continuous integration and continuous deployment)
55+
56+
## Commit Message Format
57+
58+
- Use the present tense ("Add feature" not "Added feature")
59+
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
60+
- Limit the first line to 72 characters or less
61+
- Reference issues and pull requests liberally after the first line
62+
63+
## Code Review
64+
65+
- All PRs require at least one review approval before merging
66+
- Squash commits before merging
67+
- Rebase before merging to keep the commit history clean

0 commit comments

Comments
 (0)