Skip to content

Commit

Permalink
docs: add guidelines for writing commit messages to the contribution …
Browse files Browse the repository at this point in the history
…guide (#4389)
  • Loading branch information
tujoworker authored Dec 13, 2024
1 parent b743d6e commit 34eff0e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ From a Fork:
- Make your changes in your Fork and create a _Pull Request_ back to the Eufemia repo and `origin/main`.
- Watch the result of the tests.

From a clone:
With access to the Eufemia repo:

- Make your changes and commit it to the repo in a new branch.
- Make a _Pull Request_ to `origin/main`.
- Watch the result of the tests.

## How to write a commit message

Please have a look at the [Git convention](/contribute/style-guides/git) for how to write a commit message.

## Submit Algolia search queries locally

In order to submit Algolia search queries to the `dev_eufemia_docs` index, you have to:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,27 @@ Version numbers are handled automatically by using [semantic-release](https://gi

## Commit Messages

Make sure to decorate your **commit messages** with either [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) or [simple-commit-message](https://github.com/bahmutov/simple-commit-message):
For consistency, please write commit messages in the **imperative mood**.

- `fix: an example fix message` as the subject
- `feat: this is a new feature` as the subject
- `e.g. feat: message` + `BREAKING CHANGE:` in the footer of the commit. See example below.
A clear and concise commit message helps others understand the purpose of the commit and makes it easier to search through the history for specific changes.

### Why the Imperative Mood?

The imperative mood matches the implied "command" to the codebase. Think of the message as completing the phrase: _"This commit will..."_. For example:

- **"Fix bug"** (instead of "Fixed bug")
- **"Add feature"** (instead of "Added feature")
- **"Refactor code"** (instead of "Refactored code")

This convention helps maintain consistency and clarity across the Eufemia codebase.

### Decorate your commit messages

Make sure to **decorate** your commit messages with either [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) or [simple-commit-message](https://github.com/bahmutov/simple-commit-message):

- `fix: fix message` as the subject
- `feat: feature message` as the subject
- For a major change: `feat: message` + `BREAKING CHANGE:` in the footer of the commit. See example below.

If you are working on a single component update, you can use a decoration and a scope in parenthesis:

Expand Down

0 comments on commit 34eff0e

Please sign in to comment.