diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ac4469d63..8a6c2409d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,6 +22,76 @@ You can contribute to KubeVela in several ways. Here are some examples: For more ways to contribute, check out the [Open Source Guides](https://opensource.guide/how-to-contribute/). +### Commit Conventions + +KubeVela follows the [conventional-commits](https://www.conventionalcommits.org/en/v1.0.0/) and [commit messages best practices](https://chris.beams.io/posts/git-commit/) to improve better history information. + +The commit message should be structured as follows: + +``` +[optional scope]: + +[optional body] +``` + +#### Examples: + +Commit message with scope: + +``` +Feat(lang): add polish language +``` + +Commit message with no body: + +``` +Docs: correct spelling of CHANGELOG +``` + +Commit message with multi-paragraph body: + +``` +Fix: correct minor typos in code + +see the issue for details + +on typos fixed. + +Reviewed-by: Z +Refs #133 +``` + +#### `` (required) + +Type is required to better capture the area of the commit, based on the [Angular convention](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines). + +We capitalize the `` to make sure the subject line is capitalized. `` can be one of the following: + +* **Feat**: A new feature +* **Fix**: A bug fix +* **Docs**: Documentation only changes +* **Build**: Changes that affect the build system or external dependencies +* **Style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) +* **Refactor**: A code change that neither fixes a bug nor adds a feature +* **Perf**: A code change that improves performance +* **Test**: Adding missing or correcting existing tests +* **Chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation + +#### `` (optional) + +Scope is optional, it may be provided to a commit’s type, to provide additional contextual information and is contained within parenthesis, it is could be anything specifying place of the commit change. Github issue link is +also a valid scope. For example: Fix(cli), Feat(api), Fix(#233), etc. + +You can use `*` when the change affects more than a single scope. + +#### `` (required) + +The subject MUST immediately follow the colon and space after the type/scope prefix. The description is a short summary of the code changes, e.g., "Fix: array parsing issue when multiple spaces were contained in string", instead of "Fix: bug". + +#### `` (optional) + +A longer commit body may be provided after the short subject, providing additional contextual information about the code changes. The body MUST begin one blank line after the description. + ### Report bugs Before submitting a new issue, try to make sure someone hasn't already reported the problem.