Skip to content

Commit 2bb5f18

Browse files
authored
Merge pull request #25 from luiguip/convetional-commits-docs
Enhance contributing file with git commit details
2 parents 0caa82a + bf4d65d commit 2bb5f18

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

CONTRIBUTING.adoc

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,24 @@ Try to explain the scenario to us by following these tips:
9595

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

98+
**Conventional commits**
99+
100+
Conventional commits is a specification to standardize
101+
commit messages. It improves the legibility and the meaning
102+
of the messages enforcing rules to be followed.
103+
104+
The message should be formatted as shown bellow.
105+
106+
[source]
107+
----
108+
<type>[optional scope]: <description>
109+
110+
[optional body]
111+
112+
[optional footer(s)]
113+
----
114+
115+
98116
**Types of Commits:**
99117

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

108126
- **Regular Commit Message:** This may be used for either fix or feat and can be written as `fix: <message>` or `feat: <message>`
127+
128+
[source]
129+
----
130+
fix: add NullPointerException validation
131+
----
132+
133+
[source]
134+
----
135+
feat: supporting GAV parameter
136+
----
109137
- **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
138+
139+
[source]
140+
----
141+
feat!: replace flag
142+
----
143+
144+
[source]
145+
----
146+
feat: add new flag
147+
148+
BREAKING CHANGE: used records, a feature that requires from Java 17 onwards
149+
----
110150
- **Specific breaking change:**: Example: A breaking change introduced with a new feature somewhere in the api can be written as `feat(api)!: <message>`
151+
152+
[source]
153+
----
154+
feat(api)!: add a required flag
155+
----
111156
- **Changing the docs:** `docs: <message>`
157+
158+
[source]
159+
----
160+
docs: add README.md
161+
----
112162
- **Regular commit message with specification:** A new feature introduced in the api can be written as `feat(api): <message>`
113163

164+
[source]
165+
----
166+
feat(api): add support for pom parent
167+
----
168+
114169
**Formatting Commit messages**
115170

116171
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.

0 commit comments

Comments
 (0)