2018-11-07 22:45:40 +08:00
# Contributing to Nacos
2018-07-21 00:27:23 +08:00
2018-11-07 22:45:40 +08:00
Welcome to Nacos! This document is a guideline about how to contribute to Nacos.
If you find something incorrect or missing, please leave comments / suggestions.
2018-07-21 00:27:23 +08:00
2018-11-07 22:45:40 +08:00
## Before you get started
2018-07-21 00:27:23 +08:00
2018-11-07 22:45:40 +08:00
### Code of Conduct
2018-07-21 00:27:23 +08:00
2018-11-07 22:45:40 +08:00
Please make sure to read and observe our [Code of Conduct ](./CODE_OF_CONDUCT.md ).
2018-07-21 00:27:23 +08:00
2018-11-07 22:45:40 +08:00
## Contributing
2018-07-21 00:27:23 +08:00
2018-11-07 22:45:40 +08:00
We are always very happy to have contributions, whether for typo fix, bug fix or big new features.
Please do not ever hesitate to ask a question or send a pull request.
2018-07-21 00:27:23 +08:00
2018-11-07 22:45:40 +08:00
We strongly value documentation and integration with other projects such as Spring Cloud, Kubernetes, Dubbo, etc.
We are very glad to accept improvements for these aspects.
2018-07-21 00:27:23 +08:00
2018-11-16 12:28:54 +08:00
### Open or Pickup an issue / PR
2018-11-07 22:45:40 +08:00
We use [GitHub Issues ](https://github.com/alibaba/Nacos/issues ) and [Pull Requests ](https://github.com/alibaba/Nacos/pulls ) for trackers.
If you find a typo in document, find a bug in code, or want new features, or want to give suggestions,
you can [open an issue on GitHub ](https://github.com/alibaba/Nacos/issues/new ) to report it.
Please follow the guideline message in the issue template.
2018-11-16 12:28:54 +08:00
If you just want to contribute directly you can choose the issue below.
2018-11-07 22:45:40 +08:00
2018-11-16 12:28:54 +08:00
- [Contribution Welcome ](https://github.com/alibaba/nacos/labels/contribution%20welcome ): Heavily needed issue, but currently short of hand.
- [good first issue ](https://github.com/alibaba/nacos/labels/good%20first%20issue ): Good for newcomers, new comer can pickup one for warm-up.
Now if you want to contribute, please follow the [contribution workflow ](#github-workflow ) and create a new pull request.
2018-11-07 22:45:40 +08:00
2018-11-16 12:28:54 +08:00
### Begin your contribution
2018-11-07 22:45:40 +08:00
We use the `develop` branch as the development branch, which indicates that this is a unstable branch.
2018-11-07 23:00:26 +08:00
Here is the workflow for contributors:
2018-11-07 22:45:40 +08:00
1. Fork to your own
2. Clone fork to local repository
3. Create a new branch and work on it
4. Keep your branch in sync
5. Commit your changes (make sure your commit message concise)
6. Push your commits to your forked repository
2018-11-07 22:51:59 +08:00
7. Create a pull request.
2018-11-07 22:45:40 +08:00
When creating pull request:
1. Please follow [the pull request template ](./.github/PULL_REQUEST_TEMPLATE.md ).
2. Please make sure the PR has a corresponding issue.
3. If your PR contains large changes, e.g. component refactor or new components, please write detailed documents
about its design and usage.
4. Note that a single PR should not be too large. If heavy changes are required, it's better to separate the changes
to a few individual PRs.
5. After creating a PR, one or more reviewers will be assigned to the pull request.
6. Before merging a PR, squash any fix review feedback, typo, merged, and rebased sorts of commits.
The final commit message should be clear and concise.
2018-11-16 12:28:54 +08:00
If your PR contains large changes, e.g. component refactor or new components, please write detailed documents
about its design and usage.
2018-11-07 22:45:40 +08:00
### Code review guidance
2018-11-07 23:00:26 +08:00
Our PMC will rotate reviewing the code to make sure all the PR will be reviewed timely and by at least one committer before merge. If we aren't doing our job (sometimes we drop things). And as always, we welcome volunteers for code review.
2018-11-07 22:45:40 +08:00
Some principles:
- Readability - Important code should be well-documented. API should have Javadoc. Code style should be complied with the existing one.
- Elegance: New functions, classes or components should be well designed.
- Testability - 80% of the new code should be covered by unit test cases.
- Maintainability - Comply with our [PMD spec ](style/codeStyle.xml ), and 3-month-frequency update should be maintained at least.
2018-11-16 12:28:54 +08:00