Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
bb commit style guide :: how we liven up the commit history

semantic commit messages

see how a minor change to your commit message style can make you a better programmer self generate {docs,changelog}, add context to the changeset, enable filtering (e.g. ignore styling or documentation changes), and liven up the commit history!

format: <type>(<scope>): <ticket> subject :emoji:

  • <scope>
    • optional
    • some changes are global or difficult to assign to a single component
  • <ticket>
    • optional
    • not all commits exist w/in the context of a jira ticket
  • :emoji:
    • required ;P

brandingbrand example

feat(hat): JIRA-2313 add wobble :tophat:
.--- .--   .-------- .--------- .-------
|    |     |         |          |
|    |     |         |          '-> emoji
|    |     |         |      
|    |     |         '--> summary in present tense
|    |     |
|    |     '-----> jira ticket id
|    |
|    '-------> scope of the changeset
|
'--------> type: chore, docs, feat, fix, refactor, style, or test
  • feat(logging): INFENG-583 add outbound sender header 📤
  • fix(tcptraceroute): DEVOPS-5790 conditional guarding 🚨
  • docs(examples): BBTIME-3 update 📒
  • style(beautify): beautify single line json file 🎨
  • refactor(email): DSGR-4843 recipient visibility 👓
  • test(examples): add webhook.json ↪️
  • chore(version): bump package json 💾

scoped examples

feat(hat): add wobble
.--- .--   .---------
|    |     |
|    |     '--> summary in present tense
|    |
|    '--------> scope of changeset
|
'-------------> type: chore, docs, feat, fix, refactor, style, or test
  • feat(config): add required settings
  • fix(tcptraceroute): conditional guarding 🐛
  • docs(examples): add deployment links
  • style(beautify): beautify single line json file 🎨
  • refactor(logging): update output formatting 📑
  • test(examples): add webhook.json ↪️
  • chore(version): bump package json 💾

simple examples

feat: add hat wobble
.---  .-------------
|     |
|     '-> summary in present tense.
|
'-------> type: chore, docs, feat, fix, refactor, style, or test.
  • feat: new feature for the user, not a new feature for build script
  • fix: bug fix for the user, not a fix to a build script
  • docs: changes to the documentation
  • style: formatting, missing semi colons, etc; no production code change
  • refactor: refactoring production code, eg. renaming a variable
  • test: adding missing tests, refactoring tests; no production code change
  • chore: updating grunt tasks etc; no production code change

hail mary

use case: last resort

format: :lone_emoji:

  • 🔧

cite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.