From 6dd833c0acdd65b2e5c4e071d27c2d56710378f2 Mon Sep 17 00:00:00 2001 From: zhanghongtong Date: Sat, 30 Jan 2021 17:47:58 +0800 Subject: [PATCH] docs: update contributing guidelines and add pr template --- .github/PULL_REQUEST_TEMPLATE.md | 15 +++++ .github/workflows/.gitlint | 2 +- CONTRIBUTING.md | 95 +++++++++++++++++++++++--------- 3 files changed, 85 insertions(+), 27 deletions(-) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..fdb742cdb --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,15 @@ + +Fixes + +**If your build fails** due to your commit message not passing the build checks, please review the guidelines here: https://github.com/emqx/emqx/blob/master/CONTRIBUTING.md. + +## PR Checklist +Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked.: + +- [ ] Tests for the changes have been added (for bug fixes / features) +- [ ] Docs have been added / updated (for bug fixes / features) +- [ ] In case of non-backward compatible changes, reviewer should check this item as a write-off, and add details in **Backward Compatibility** section + +## Backward Compatibility + +## More information \ No newline at end of file diff --git a/.github/workflows/.gitlint b/.github/workflows/.gitlint index 1396f5911..bf89ba253 100644 --- a/.github/workflows/.gitlint +++ b/.github/workflows/.gitlint @@ -58,7 +58,7 @@ ignore=title-trailing-punctuation, T1, T2, T3, T4, T5, T6, T8, B1, B2, B3, B4, B # python-style regex that the commit-msg title must match # Note that the regex can contradict with other rules if not used correctly # (e.g. title-must-not-contain-word). -regex=^(feat|fix|docs|style|refactor|test|chore|perf)\(.+\): .+ +regex=^(feat|fix|docs|style|refactor|test|build|ci|revert|chore|perf)(\(.+\))*: .+ # [body-max-line-length] # line-length=72 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f2c61087b..f91359e19 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,37 +2,80 @@ You are welcome to submit any bugs, issues and feature requests on this repository. -## Pull Request Process -1. Update the README.md with details of changes to the interface. +## Commit Message Guidelines -2. Ensure that each of the commit messages are in the following style: +We have very precise rules over how our git commit messages can be formatted. This leads to **more readable messages** that are easy to follow when looking through the **project history**. - Format: `(): ` +### Commit Message Format - Type: +Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes a **type**, a **scope** and a **subject**: - - `feat`: (new feature for the user, not a new feature for build script) - - `fix`: (bug fix for the user, not a fix to a build script) - - `docs`: (changes to the documentation) - - `style`: (formatting, missing semi colons, etc; no production code change) - - `refactor`: (refactoring production code, eg. renaming a variable) - - `test`: (adding missing tests, refactoring tests; no production code change) - - `chore`: (updating grunt tasks etc; no production code change) - - `perf`: (performance improvements) +``` +(): + + + +