From aa48b6100afd64d70af5b92ecebe0436a2192cd5 Mon Sep 17 00:00:00 2001 From: Mirjam Aulbach Date: Tue, 18 Oct 2022 11:30:59 +0200 Subject: [PATCH 1/3] Add CONTRIBUTING file with first important information. --- CONTRIBUTING.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..2ce8e925ee --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,15 @@ +# Contributing Guidelines + +🎉 First off: Thank you for your interest in contributing to our project đŸĨŗ + +Whether it's a bug report, new feature, correction, or additional documentation, we greatly value feedback and contributions from our community. + +Please read through this document before submitting any issues or pull requests. This ensures we have all necessary information to respond to your bug report or contribution. + + +## Code of Conduct + +This project has adopted the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). Before contributing, please take the time to read our COC. Everyone participating is expected to uphold this code. Please report unacceptable behavior to us! + +For more information see the [Code of Conduct FAQ](https://www.contributor-covenant.org/faq/). + From e738a1c839a3d45f3b1ec3b9bd8bfe869df076e5 Mon Sep 17 00:00:00 2001 From: Mirjam Aulbach Date: Tue, 18 Oct 2022 13:34:01 +0200 Subject: [PATCH 2/3] Update contribution guide with guidelines for commit messages --- CONTRIBUTING.md | 81 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2ce8e925ee..3063277b96 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,9 +7,88 @@ Whether it's a bug report, new feature, correction, or additional documentation, Please read through this document before submitting any issues or pull requests. This ensures we have all necessary information to respond to your bug report or contribution. -## Code of Conduct +## ❤ī¸ Code of Conduct This project has adopted the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). Before contributing, please take the time to read our COC. Everyone participating is expected to uphold this code. Please report unacceptable behavior to us! For more information see the [Code of Conduct FAQ](https://www.contributor-covenant.org/faq/). +### Guideline commit messages + +We uses the [Conventional Commits](https://www.conventionalcommits.org/) specification. It helps us creating a helpful and explicit git history. + +### ℹī¸ Semantic prefixes for commit messages + +- **fix**: a commit that patches a bug. +Example: `fix: Removes circular dependency` + +- **feat**: a commit that introduces a new feature. +Example: `feat: Add sorting to user list` + +- **docs**: a commit that changes something related to documentation. +Example: `docs: Update contribution guide with guidelines for commit messages` + +- **refactor**: a commit that refactors existing code. +Example: `refactor: Update footer from kafkawize.io to klaw-project.io` + + +### ✍ī¸ Writing a great commit message + +A "great" commit message enables others to gain more context about a code change. While the `diff` is telling you **what** has changes, the commit message can tell you **why** it has changed. + +For more information read this article: [How to Write a Git Commit Message](https://cbea.ms/git-commit/). We used it as a base for our rules. + + +#### Rules + +``` +: + +[optional body] + +``` + +**1. Add a short description as first line** +The first line (``) should be a short description of your change. Limit it to preferably 50 characters. It never should be longer than 72 characters. + +**⛔ī¸ Don't** + +`Add CONTRIBUTING.md with first information about Code Of Conduct and a guideline for commit messages that includes our first rules and pattern we want to establish` + +**ī¸âœ… Do** + +`Add first iteration for contribution guide` + +**2. Use the "imperative mood" in first line** +"Imperative mood" means you form a sentence as if you were giving a command. You can image your commit message completing the sentence _"If applied, this commit will... "_. + +**⛔ī¸ Don't** +`fix: Removed the newline that caused a linting error` +-> _"If applied, this commit will removed the newline that caused a linting error"_ + +**ī¸âœ… Do** +`fix: Remove the newline that caused a linting error` +-> _"If applied, this commit will remove the newline that caused a linting error"_ + +**3. Separate your description with a new line from the body.** +If you add an body, add an empty line between your description to separate it from the body. This makes the message more readable. It also makes `git log --oneline` or `git shortlog` more useable. + +**4. Use an optional body to explain why, not how.** +You don't need to explain the code! The commit message has a changeset that contains this information. Use the body to explain _why_ you made a change. Not every commit needs to have a body. Often the code change itself is explanation enough. + +**⛔ī¸ Don't** +``` +fix: Fix typo + +Change "optoinal" "to optional" +``` + + +**ī¸âœ… Do** +```fix: Remove word + +Remove "just" from description, because it can make people feel inadequate. +``` + +**5. Wrap your body at 72 characters** +Git does not wrap text, so you have to take care of margins. Editors and IDEs can help with that. From 2935898ad5df1ea7bb670cdfe3937ea0733ced39 Mon Sep 17 00:00:00 2001 From: Mirjam Aulbach Date: Fri, 21 Oct 2022 13:19:24 +0200 Subject: [PATCH 3/3] Update CONTRIBUTING.md Co-authored-by: Josep Prat --- CONTRIBUTING.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3063277b96..ccf41f3a05 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ Whether it's a bug report, new feature, correction, or additional documentation, we greatly value feedback and contributions from our community. -Please read through this document before submitting any issues or pull requests. This ensures we have all necessary information to respond to your bug report or contribution. +Please read through this document before submitting any issues or pull requests. This ensures all parties have all necessary information to respond to your bug report or contribution. ## ❤ī¸ Code of Conduct @@ -13,7 +13,7 @@ This project has adopted the [Contributor Covenant Code of Conduct](CODE_OF_COND For more information see the [Code of Conduct FAQ](https://www.contributor-covenant.org/faq/). -### Guideline commit messages +## Guideline commit messages We uses the [Conventional Commits](https://www.conventionalcommits.org/) specification. It helps us creating a helpful and explicit git history. @@ -64,11 +64,11 @@ The first line (``) should be a short description of your change. L **⛔ī¸ Don't** `fix: Removed the newline that caused a linting error` --> _"If applied, this commit will removed the newline that caused a linting error"_ +-> _"If applied, this commit will_ removed the newline that caused a linting error" **ī¸âœ… Do** `fix: Remove the newline that caused a linting error` --> _"If applied, this commit will remove the newline that caused a linting error"_ +-> _"If applied, this commit will_ remove the newline that caused a linting error" **3. Separate your description with a new line from the body.** If you add an body, add an empty line between your description to separate it from the body. This makes the message more readable. It also makes `git log --oneline` or `git shortlog` more useable.