Skip to content

Commit 1b1ff48

Browse files
committed
πŸ“š Design: improve discussion on type emojis
In the commit message template, add the `TYPE-` prefix to `<EMOJI>` in the subject line, to make it more clear that this emoji has to represent the type of change. Adapt the "important" note on not using emojis in the commit body to forbid using emojis further down the subject line instead. Although I'm unsure if emojis in the body are a good idea, they might have use cases, and finding the type of change is still very easy using the `git log --oneline` option. The corresponding text in the "common concerns" section is also adapted.
1 parent 9ce5fe1 commit 1b1ff48

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

β€Ždocs/design.mdβ€Ž

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ We've also taken inspiration from the [MyST parser contribution guide](https://g
9999
Here is an example of the desired format for a commit message:
100100

101101
```
102-
<EMOJI> <SCOPE>: Summarize changes in 72 characters or less
102+
<TYPE-EMOJI> <SCOPE>: Summarize changes in 72 characters or less
103103
104104
More detailed explanatory text, if necessary. Explain the problem that this
105105
commit is solving. Focus on what you are changing, why you are making this
@@ -141,7 +141,7 @@ Some advantages:
141141

142142
!!! important
143143

144-
Although we are in favor of using emojis in the subject line, we do **not** allow emojis in the body.
144+
Although we are in favor of using leading emojis to indicate the type, we do **not** allow emojis further down the subject line.
145145
This makes it easier to `grep` for commit types.
146146

147147
The list in the table below is in order of priority, e.g. a backwards-incompatible change might improve an existing feature by breaking its API, but should _not_ be typed as an improvement (πŸ‘Œ).
@@ -182,12 +182,14 @@ Similarly, if a dependency is changed, it's convenient to quickly spot this, e.g
182182
183183
We haven't needed to use much tooling so far, and built our own for e.g. the changelog.
184184

185-
> Search/grep is harder.
185+
> Search/`grep` is harder.
186186
187-
You can grep for emojis too!
188-
Moreover, the body of the commit should not contain any emojis, so it's quite easy to look for commit types:
187+
You can `grep` for emojis too!
188+
In fact, it's _easier_ to exclusively find the commits you are looking for:
189189

190-
git log | grep '[πŸ’₯βœ¨πŸ‘ŒπŸ›βŒπŸ“¦]'
190+
git log --oneline | grep '[πŸ’₯βœ¨πŸ‘ŒπŸ›βŒπŸ“¦]'
191+
192+
Using e.g. `test` to `grep` for the type will likely also find commits of other types.
191193

192194
> Accessibility / screen readers read β€˜sparkles’
193195

0 commit comments

Comments
Β (0)