executablebooks / meta

A community dedicated to supporting tools for technical and scientific communication and interactive computing
https://executablebooks.org
132 stars 167 forks source link

Implement Git Commits Convention (w/ Emoji) #74

Closed chrisjsewell closed 4 years ago

chrisjsewell commented 4 years ago

Just a bit of fun, but I quite like the idea of consolidating our commit "protocol" to use an emoji based system: (a) its just more visually appealing, but also (b) it would standardise commits in a way that could allow for automated changelog creation

https://github.com/carloscuesta/gitmoji has lots of stars, but actually I quite like https://github.com/ahmadawais/Emoji-Log for its simplicity. Although basically we just agree on some commit categories + emojis and stick to them across the organisation.

Thoughts?

choldgraf commented 4 years ago

I don't have super strong opinions on this - is it something that people have to manually install first, or remember to type when they make a commit?

cc also @rowanc1 who has an impressive git-emoji-practice in his repos https://github.com/iooxa/editor

rowanc1 commented 4 years ago

Ha, I have seen this on a few repos. Beyond it actually helping to visually separate out packaging and readme commits etc. I think it makes the package seem more approachable/fun?

It is nice to see that there are actually standards/suggestions out there for this, I challenge myself to find a emoji that represents my (mood + commit) % rockets which probably won't scale. ...

๐Ÿ‘ from me!

chrisjsewell commented 4 years ago

No theres no installs or anything, its just a convention we agree on. Even if we didn't do it with emojis it just feels better practice to categorise commits (FIX, DOCS, NEW, IMPROVE, ...)

@rowanc1 one thing I wanted to clarify actually; do you directly use the emojis, or write in the github shorthands e.g. :smile: (๐Ÿ˜„)

rowanc1 commented 4 years ago

Yep, I just use an emoji picker (cmd-ctrl-space on a mac) -- all though a real life, emoji keyboard is tempting. :)

chrisjsewell commented 4 years ago

yeh thats what I do... use the emoji keyboard ๐Ÿ˜† ๐Ÿคฃ ๐Ÿ™ƒ ๐Ÿ‘ ๐Ÿป

chrisjsewell commented 4 years ago

I am going to start using this convention; <EMOJI> <KEYWORD>: <HEADING>, with the following:

Loosely from emoji-log:

Additional (loosely from gitmoji):

I think this captures just about everything, as concisely as possible? This would then essentially be used to sort the changelog of a release into sub-headings, something like:

(other categories would not be included) As well as visuals, this is the main thing here: to get you to think up front about how commits will be transposed into the changelog

If so, it would be nice if others could agree and also do the same ๐Ÿ˜

choldgraf commented 4 years ago

I like all of those icons for sure - I'm also +1 on having this be a convention but not a hard rule (e.g. I don't want to block somebody's PR saying 'you can't merge this until you push a new commit that has a smiley emoji in it :-)")

That said - I just realized: we'd only be doing this on the squash commit, right? So this is something that a maintainer to could choose to add?

chrisjsewell commented 4 years ago

So this is something that a maintainer to could choose to add?

Yep exactly, as I've moaned about before lol (and now everyone is generally following ๐Ÿ˜„):

image

choldgraf commented 4 years ago

I'll try to start using this convention for the PRs that I merge ๐Ÿ‘ . @chrisjsewell wanna make a PR to the executablebooks.org repository that has a little table of emojis -> their meaning like you shared above? Otherwise I will definitely forget haha

chrisjsewell commented 4 years ago

cheers yeh will do, then just give any feedback here as you use it, e.g. suggestions for adding/removing/renaming categories

then at some point we can probably find/write a script to auto-generate release/changelog sections, by parsing the commit history (since the last release) and sorting/filtering commit messages (identified by regex) into the sub-headings I mention above

chrisjsewell commented 4 years ago

For future reference: https://github.com/executablebooks/sphinx-copybutton/pull/88#issuecomment-662764594