Skip to content

Commit a558f1e

Browse files
authored
Create CONTRIBUTING.md
1 parent 122a260 commit a558f1e

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

CONTRIBUTING.md

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# CONTRIBUTING
2+
3+
## Contributing code via Github
4+
5+
Swoft currently uses Git to control the version of the program. If you want to contribute source code to Swoft, please get an overview of how Git is used. We currently host the project on GitHub, and any GitHub user can contribute code to us.
6+
7+
The way to participate is very simple, fork a swoft-component or swoft-ext code into your warehouse, modify and submit, and send us a pull request, we will promptly review the code and process your application. After the review, your code will be merged into our repository, so you will automatically appear on the contributor list, very convenient.
8+
9+
We hope that the code you contributed will be:
10+
11+
- Swoft's coding specification
12+
- Appropriate comments that others can read
13+
- Follow the Apache2 open source protocol
14+
- Submit a commit message must be in English
15+
16+
> If you would like more details or have any questions, please continue reading below
17+
18+
Precautions
19+
20+
- PSR-2 is selected for the code formatting standard of this project;
21+
- class name and class file name follow PSR-4;
22+
- For the processing of Issues, use the commit title such as `fix swoft-cloud/swoft#xxx(Issue ID)` to directly close the issue.
23+
- The system will automatically test and modify on PHP 7.1+ (`7.1 7.2 7.3`) Swoole 4.4.1+
24+
- The administrator will not merge the changes that caused CI faild. If CI faild appears, please check your source code or modify the corresponding unit test file.
25+
26+
## GitHub Issue
27+
28+
GitHub provides the Issue feature, which can be used to:
29+
30+
- Raise a bug
31+
- propose functional improvements
32+
- Feedback experience
33+
34+
This feature should not be used for:
35+
36+
- Unfriendly remarks
37+
38+
## Quick modification
39+
40+
GitHub provides the ability to quickly edit files
41+
42+
- Log in to your GitHub account;
43+
- Browse the project file and find the file to be modified;
44+
- Click the pencil icon in the upper right corner to modify it;
45+
- Fill in Commit changes related content (Title is required)
46+
- Submit changes, wait for CI verification and administrator merge.
47+
48+
> This method is suitable for modifying the document project. If you need to submit a large number of changes at once, please continue reading the following
49+
50+
## Complete process
51+
52+
- fork swoft-component or swoft-ext project;
53+
- Clone your fork project to the local;
54+
- Create a new branch and checkout the new branch;
55+
- Make changes. If your changes include additions or subtractions of methods or functions, please remember to modify the unit test file.
56+
- Push your local repository to GitHub;
57+
- submit a pull request;
58+
- Wait for CI verification (if you don't pass, you need to fix the code yourself, GitHub will automatically update your pull request);
59+
- Waiting for administrator processing
60+
61+
## Precautions
62+
63+
If you have any questions about the above process, please check out the GIT tutorial;
64+
65+
For different aspects of the code, create different branches in your own fork project.

0 commit comments

Comments
 (0)