Skip to content

Commit

Permalink
Merge pull request #25 from luiguip/convetional-commits-docs
Browse files Browse the repository at this point in the history
Enhance contributing file with git commit details
  • Loading branch information
dearrudam committed Sep 25, 2023
2 parents 0caa82a + bf4d65d commit 2bb5f18
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions CONTRIBUTING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,24 @@ Try to explain the scenario to us by following these tips:

To contribute to the repo one must adhere to the following:

**Conventional commits**

Conventional commits is a specification to standardize
commit messages. It improves the legibility and the meaning
of the messages enforcing rules to be followed.

The message should be formatted as shown bellow.

[source]
----
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
----


**Types of Commits:**

- **fix:** Any commit that patches a bug anywhere in the codebase
Expand All @@ -106,11 +124,48 @@ To contribute to the repo one must adhere to the following:
**Examples of commits**

- **Regular Commit Message:** This may be used for either fix or feat and can be written as `fix: <message>` or `feat: <message>`

[source]
----
fix: add NullPointerException validation
----

[source]
----
feat: supporting GAV parameter
----
- **Commit with breaking change**: Example: A new feature being introduced as a breaking change can be written as `feat!: <message>`, this can also simply be written as a regular feat with the *BREAKING CHANGE* appended to it at the end of the commit

[source]
----
feat!: replace flag
----

[source]
----
feat: add new flag
BREAKING CHANGE: used records, a feature that requires from Java 17 onwards
----
- **Specific breaking change:**: Example: A breaking change introduced with a new feature somewhere in the api can be written as `feat(api)!: <message>`

[source]
----
feat(api)!: add a required flag
----
- **Changing the docs:** `docs: <message>`

[source]
----
docs: add README.md
----
- **Regular commit message with specification:** A new feature introduced in the api can be written as `feat(api): <message>`

[source]
----
feat(api): add support for pom parent
----

**Formatting Commit messages**

All commit messages must clearly state the change that takes place. Multiple paragraphs or bullet points explaining the changes in detail are encouraged. The message must contain the link to the issue that it is directed towards.
Expand Down

0 comments on commit 2bb5f18

Please sign in to comment.