type: the type of the commit is one of the following:
feat: new features.
fix: bug fixes.
docs: documentation changes.
refactor: refactor of a particular code section without introducing new features or bug fixes.
style: code style improvements.
perf: performance improvements.
test: changes to the test suite.
ci: changes to the CI system.
build: changes to the build system (we don’t yet have one so this shouldn’t apply).
chore: for other changes that don’t match previous types. This doesn’t appear in the changelog.
scope: section of the codebase that the commit makes changes to. If it makes changes to many sections, or if no section in particular is modified, leave blank without the parentheses. Examples:
- Commit that adds a
test(actors): add an actor test
- Commit that changes many things at once:
style: adopt eslint
For changes to examples, the scope should be the example name with the
fix(agnoster): commit subject
fix(examples/http/actor): commit subject
- Commit that adds a
!: this goes after the
typeif scope is empty), to indicate that the commit introduces breaking changes.
Optionally, you can specify a message that the changelog tool will display to the user to indicate what’s changed and what they can do to deal with it. You can use multiple lines to type this message; the changelog parser will keep reading until the end of the commit message or until it finds an empty line.
Example (made up):
style(agnoster)!: change dirty git repo glyph BREAKING CHANGE: the glyph to indicate when a git repository is dirty has changed from a Powerline character to a standard UTF-8 emoji. Fixes #420 Co-authored-by: Username <email>
subject: a brief description of the changes. This will be displayed in the changelog. If you need to specify other details you can use the commit body but it won’t be visible.
Formatting tricks: the commit subject may contain:
Links to related issues or PRs by writing
#issue. This will be highlighted by the changelog tool:
feat(archlinux): add support for aura AUR helper (#9467)
Formatted inline code by using backticks: the text inbetween backticks will also be highlighted by the changelog tool:
feat(shell-proxy): enable unexported `DEFAULT_PROXY` setting (#9774)
Try to keep the first commit line short. This is harder to do using this commit style but try to be concise and if you need more space, you can use the commit body. Try to make sure that the commit subject is clear and precise enough that users will know what change by just looking at the changelog.
To ensure consistency throughout the source code, keep these rules in mind as you are working:
- All features or bug fixes must be tested by one or more specs (unit-tests).
- All public API methods must be documented.
- We follow [ESLint RecommendedRules][https://eslint.org/docs/rules/].
- Contain steps to download/install any required pre-requisites. Someone coming in with a fresh OS install should be able to start on the example and complete it without an error. Links to external download pages are fine.
daprdocs directory contains the markdown files that are rendered into the Dapr Docs website. When the documentation website is built, this repo is cloned and configured so that its contents are rendered with the docs content. When writing docs, keep in mind:
- All rules in the docs guide should be followed in addition to these.
- All files and directories should be prefixed with
js-to ensure all file/directory names are globally unique across all Dapr documentation.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.