β¨(π): Gitmoji conventionnal commits (draft)
See original GitHub issueHello all,
here is only a reflexion about creating a convention for commit messages using Gitmoji.
This should not be included in the gitmoji project; but should serve as help for people who wants to use gitmoji in a team. This is then a draft of how to use them well or at least a way to sort the gitmojis. Not all the gitmojis are included btw.
Motivation for a convention
- Gitmoji can improve readability of commits and provides more informations than the other conventions
- there is a lot of gitmojis now; how to use them when the project is shared ? Is there a way to sort them ?
- some gitmojis are dedicated to an action; other to a scope and other are just funny. They should be sorted for serious usages.
The only problem is that gitmojis are not supported everywhere and thus, should be used when every members can read them.
Convention
The Angular commit convention follow this rule <type>(<scope>): <subject>
and have proven that it works well. Gitmoji can match nearly this case: <type>
can be replaced by <action>
. βactionβ matches better the gitmoji definitions on the website.
- the action defines the activity of the commit ; it describes what or how it is done on the project
- the scope is optional and can be provided as text or as a Gitmoji. It gives the where in the project. It could be a abstract portion of the project (documentation, database, β¦) or one filename.
- the description is a free text
At least one gitmoji must be used for each commit
Sorting the gitmojis
Action (What ?)
action (related to) | Gitmojis |
---|---|
the code | π¨, β‘, π, π, β¨, π¨, β»οΈ, π§, π½,π‘, π¬,π₯, πΈ, ποΈ,π€‘, πΈ, π·οΈ, π₯ , ποΈ |
Git / Version Control System | π, π, βͺ, π |
the project strucure | π₯, π, π, π, π, π·, π, β, β, π¦, π, π, π±, π |
Scope (Where ?)
specific scope on | Gitmojis |
---|---|
part of the code | π·, π±, π, ποΈ |
OS | π, π§, π, π€, π |
technologies | π³, βΈοΈ, β¦ |
user | π±, β¦ |
Outsider
π©, π», π, β¦ but always funny to use
Translating the Angular convention
Angular types | possible Gitmoji(s) |
---|---|
feat | β¨, βΏ, πΈ, β¦ |
fix | π |
docs | π |
style | π¨, π¨ |
refactor | β»οΈ |
test | β |
chore | π, π₯, π¦, β¬οΈ, β¬οΈ, π½, π, π β¦ |
Examples
π€‘(idGenerator.ts): add mocks
π ignore the dist directory
πΈ(home.vue)
π·οΈ(interfaces.ts): add type definition for EmojiReponse
π id_generator.ts β IdGenerator.ts
π feat/api-v1 β master
π feat/api-v1 into master
π₯(eslintrc.json): duplicate with eslintrc.js
π¨(store.ts)
β»οΈ(ποΈ) : rename the field βageβ in the table USER
Comments
As the new issue #435 is related, the project is defining emojis without specific goal. Some comments in the issue explain well how the gitmojis can be used. I think Gitmoji should be neutral (such as a dictionary; without opinion) and let people decide how to use the emojis.
Some gitmojis indicate implicitly the scope such as β or π. Some provide the action and the scope such as π
A placeholder for the effect of the commit on the project can be added too. I think specifically about the π₯ I donβt use it and might be used at the end of the commit message ?
With this commit message pattern, some Gitmojis are ambiguous such as π§. It does not provide a clear where, nor an clear action and mix both where and action and does not fit. They should be kept in Gitmoji but excluded in use for this convention.
Using more than one emojis make the message less readable IMHO; so using emojis for scope makes the commit harder to read. It is a possibility however. It opens the way to new gitmojis such as #321
This can be seemed as overkill and gitmojis should be kept simple anyway ! Maybe this is too much ?
So what do you think of it ? Is it to throw away; or to be improved and how ? I hope it makes the emojis less chaotic π
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:14 (8 by maintainers)
Top GitHub Comments
Hi,
I know itβs been a while since this issue was last updated. I was wondering if moving forward with this is still planned? Having a convention commit format for gitmoji would definitely save me a ton of headaches when trying to deal with all the tooling out there that expects conventional commits these days. π
At the moment Iβm shoving multiple shims in everywhere or writing custom regex to convert between gitmoji and conventional commits. Iβd prefer to stay with gitmoji over cc, butβ¦ itβs getting harder as time goes on π¬
I think we can move forward with the approach agreed on https://github.com/carloscuesta/gitmoji/issues/442#issuecomment-1059802990, letβs include this on the website and the readme under a βexample of usageβ