Skip to content

Commit 1efd3b8

Browse files
authored
chore: specify commit conventions in CONTRIBUTING.md
1 parent 6cb8653 commit 1efd3b8

File tree

1 file changed

+48
-1
lines changed

1 file changed

+48
-1
lines changed

β€Ž.github/CONTRIBUTING.mdβ€Ž

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,51 @@ __:x: Bad Example__
164164
4. **Monorepo Split Action**
165165
- The `symplify/[email protected]` GitHub action is called for every package and provided the necessary information (destination repo, directory, etc.).
166166
- This action takes any changes and pushes them to the sub-split repository determined by combining the "Organization" and "Repository" values returned in step 2.
167-
- Depending on whether a tag is found or not, a tag is also supplied so the repository is tagged appropriately.
167+
- Depending on whether a tag is found or not, a tag is also supplied so the repository is tagged appropriately.
168+
169+
# Commit and merge conventions
170+
171+
Commits must all respect the [conventional commit specification](https://www.conventionalcommits.org/en/), so the changelog and release notes are generated using the commit history.
172+
173+
## Commit descriptions
174+
175+
Commit descriptions **should not** start with an uppercase letter and should use [imperative mood](https://git.kernel.org/pub/scm/git/git.git/tree/Documentation/SubmittingPatches?h=v2.36.1#n181):
176+
177+
```diff
178+
- feat(support): Adds some cool feature
179+
+ feat(support): add some cool feature
180+
```
181+
182+
## Commit scopes
183+
184+
Scopes are not mandatory, but are highly recommended for consistency and easy of read. The following scopes are the most commonly used:
185+
186+
- `feat` β€” for a new feature
187+
- `fix` β€” for a bug fix
188+
- `refactor` β€” for changes in code that are neither bug fixes or new features
189+
- `docs` β€” for any change related to the documentation
190+
- `perf` β€” for code refactoring that improves performance
191+
- `test` β€” for code related to automatic testing
192+
- `style` β€” for refactoring related to the code style (not for CSS)
193+
- `ci` β€” for changes related to our continuous integration pipeline
194+
- `chore` β€” for anything else
195+
196+
Here are some commit examples:
197+
198+
```
199+
feat(support): add `StringHelper` class
200+
feat(support/string): add `uuid` method
201+
perf(discovery): improve cache efficiency
202+
refactor(highlight): improve code readability
203+
docs: mention new `highlight` package
204+
chore: update dependencies
205+
style: apply php-cs-fixer
206+
```
207+
208+
## Pull requests
209+
210+
Pull request titles and descriptions should be as explicit as possible to ease the review process.
211+
212+
Contributors are not required to respect conventional commits within pull requests, but doing so will ease the review process by removing some overhead for core contributors.
213+
214+
All pull requests will be renamed to the conventional commit convention if necessary before being squash-merged to keep the commit history and changelog clean.

0 commit comments

Comments
Β (0)