Skip to main content

Contribute

Issues and feature requests belong on github.com/panter/catladder/issues; see development for how to build and test catladder locally.

Catladder itself releases with the changesets method, so user-facing changes merge together with a .changeset/*.md file — the 🦋 changeset check job on your pull request tells you what is missing and what the next release would look like.

The commit message conventions below still apply to catladder's history, and they are what drives the version bump in every project that uses the semantic-release release method.

Commit message guidelines​

Atomic commits​

If possible, make atomic commits, which means that a commit should:

  • Contain exactly one self-contained functional change
  • Not depend on changes in one of your later commits
  • Not create an inconsistent state (such as test errors, linting errors, partial fix, feature with documentation etc…)

A complex feature can be broken down into multiple commits as long as each one maintains a consistent state and consists of a self-contained change.

Commit message format​

Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:

<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>

The header is mandatory and the scope of the header is optional.

The footer can contain a closing reference to an issue.

Revert​

If the commit reverts a previous commit, it should begin with revert: , followed by the header of the reverted commit.
In the body, it should say: This reverts commit <hash>., where the hash is the SHA of the commit being reverted.

Type​

The type must be one of the following:

TypeDescription
buildChanges that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
ciChanges to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
docsDocumentation only changes
featA new feature
fixA bug fix
perfA code change that improves performance
refactorA code change that neither fixes a bug nor adds a feature
styleChanges that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc)
testAdding missing tests or correcting existing tests

Subject​

The subject contains a succinct description of the change:

  • use the imperative, present tense: "change" not "changed" nor "changes"
  • don't capitalize the first letter
  • no dot (.) at the end

Body​

Just as in the subject, use the imperative, present tense: "change" not "changed" nor "changes".
The body should include the motivation for the change and contrast this with previous behaviour.

The footer should contain any information about Breaking Changes and is also the place to reference issues that this commit Closes.

Breaking Changes should start with the word BREAKING CHANGE: with a space or two newlines.
The rest of the commit message is then used for this.

Examples​

`fix(pencil): stop graphite breaking when too much pressure applied`
`feat(pencil): add 'graphiteWidth' option`

Fix #42
perf(pencil): remove graphiteWidth option`

BREAKING CHANGE: The graphiteWidth option has been removed.

The default graphite width of 10mm is always used for performance reasons.