Skip to content

Commit

Permalink
docs(contributing): define semantic commit message rules (puppeteer#1233
Browse files Browse the repository at this point in the history
)

Semantic commit messages drastically simplify preparation of releases.
  • Loading branch information
aslushnikov authored Nov 1, 2017
1 parent f5bb333 commit bc7f211
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,46 @@ To run code linter, use:
npm run lint
```

## Commit Messages

Commit messages should follow the Semantic Commit Messages format:

```
label(namespace): title
description
footer
```

1. *label* is one of the following:
- `fix` - puppeteer bug fixes
- `feat` - puppeteer features
- `docs` - changes to docs, e.g. `docs(api.md): ..` to change documentation
- `test` - changes to puppeteer tests infrastructure
- `style` - puppeteer code style: spaces/alignment/wrapping etc
- `chore` - build-related work, e.g. doclint changes / travis / appveyour
1. *namespace* is put in parenthesis after label and is optional
2. *title* is a brief summary of changes
3. *description* is **optional**, new-line separated from title and is in present tense
4. *footer* is **optional**, new-line separated from *description* and contains "fixes" / "references" attribution to github issues
5. *footer* should also include "BREAKING CHANGE" if current API clients will break due to this change. It should explain what changed and how to get the old behavior.

Example:

```
fix(Page): fix page.pizza method
This patch fixes page.pizza so that it works with iframes.
Fixes #123, Fixes #234
BREAKING CHANGE: page.pizza now delivers pizza at home by default.
To deliver to a different location, use "deliver" option:
`page.pizza({deliver: 'work'})`.
```


## Writing Documentation

All public API should have a descriptive entry in the [docs/api.md](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md). There's a [documentation linter](https://github.com/GoogleChrome/puppeteer/tree/master/utils/doclint) which makes sure documentation is aligned with the codebase.
Expand Down

0 comments on commit bc7f211

Please sign in to comment.