|
1 | | -coming soon ...... |
| 1 | +# Contribution Guide |
| 2 | + |
| 3 | +Cobar is a community driven open source project and we welcome any contributor. |
| 4 | + |
| 5 | +This document outlines some conventions about development workflow, commit message formatting, contact points and other resources to make it easier to get your contribution accepted. |
| 6 | + |
| 7 | +## Pre submit pull request/issue flight checks |
| 8 | + |
| 9 | +Before you move on, please make sure what your issue and/or pull request is, a simple bug fix or an architecture change. |
| 10 | + |
| 11 | +In order to save reviewers' time, each issue should be filed with template and should be sanity-checkable in under 5 minutes. |
| 12 | + |
| 13 | +### Is this a simple bug fix? |
| 14 | + |
| 15 | +Bug fixes usually come with tests. With the help of continuous integration test, patches can be easy to review. Please update the unit tests so that they catch the bug! |
| 16 | + |
| 17 | +### Is this an architecture improvement? |
| 18 | + |
| 19 | +Some examples of "Architecture" improvements: |
| 20 | + |
| 21 | +- Converting structs to interfaces. |
| 22 | +- Improving test coverage. |
| 23 | +- Decoupling logic or creation of new utilities. |
| 24 | +- Making code more resilient (sleeps, backoffs, reducing flakiness, etc). |
| 25 | + |
| 26 | +If you are improving the quality of code, then justify/state exactly what you are 'cleaning up' in your Pull Request so as to save reviewers' time. |
| 27 | + |
| 28 | +If you're making code more resilient, test it locally to demonstrate how exactly your patch changes |
| 29 | +things. |
| 30 | + |
| 31 | +## Workflow |
| 32 | + |
| 33 | +### Step 1: Fork in the cloud |
| 34 | + |
| 35 | +1. Visit https://github.com/alibaba/cobar |
| 36 | +2. Click `Fork` button (top right) to establish a cloud-based fork. |
| 37 | + |
| 38 | +### Step 2: Clone fork to local storage and develop |
| 39 | + |
| 40 | +### Step 7: Create a pull request |
| 41 | + |
| 42 | +1. Visit your fork at https://github.com/$user/cobar (replace `$user` obviously). |
| 43 | +2. Click the `Compare & pull request` button next to your branch. |
| 44 | + |
| 45 | +#### Step 8: get a code review |
| 46 | + |
| 47 | +Once your pull request has been opened, it will be assigned to reviewers, |
| 48 | +Those reviewers will do a thorough code review, looking for |
| 49 | +correctness, bugs, opportunities for improvement, documentation and comments, |
| 50 | +and style. |
| 51 | + |
| 52 | +Commit changes made in response to review comments to the same branch on your |
| 53 | +fork. |
| 54 | + |
| 55 | +Very small PRs are easy to review. Very large PRs are very difficult to |
| 56 | +review. |
| 57 | + |
| 58 | +## Code style |
| 59 | + |
| 60 | +The IntelliJ IDEA default java code style is Recommended,in every project has `.editorconfig` file, for more information please visit http://editorconfig.org/ |
| 61 | + |
| 62 | +## Commit message style |
| 63 | + |
| 64 | +Please follow this style to make Cobar easy to review, maintain and develop. |
| 65 | + |
| 66 | +``` |
| 67 | +<subsystem>: <what changed> |
| 68 | +<BLANK LINE> |
| 69 | +<why this change was made> |
| 70 | +<BLANK LINE> |
| 71 | +<footer>(optional) |
| 72 | +``` |
| 73 | + |
| 74 | +The first line is the subject and should be no longer than 70 characters, the |
| 75 | +second line is always blank, and other lines should be wrapped at 80 characters. |
| 76 | +This allows the message to be easier to read on GitHub as well as in various |
| 77 | +git tools. |
| 78 | + |
| 79 | +If the change affects more than one subsystem, you can use comma to separate them like `util/codec,util/types:`. |
| 80 | + |
| 81 | +If the change affects many subsystems, you can use ```*``` instead, like ```*:```. |
| 82 | + |
| 83 | +For the why part, if no specific reason for the change, |
| 84 | +you can use one of some generic reasons like "Improve documentation.", |
| 85 | +"Improve performance.", "Improve robustness.", "Improve test coverage." |
0 commit comments