This document provides a collection of rules and guidelines that need to be adhered to when working with or contributing to FluidMS.
For issues, please adhere to the following formatting of the issue title:
<type>: <description of the issue>
<type>
can be one of the following:
bug
feat
improvement
question
Example:
feat: add new testing tool
Any work is performed on dedicated feature branches. This work is lead back to our develop
base branch via pull requests. The master
branch is our release and stable branch.
If you create a new branch, stick to the following naming convention:
<branch-type>/<GitHub-issue-number>/<branch-title>
<branch-type>
can be any type that is also allowed for commit types:
Example:
ci/12/travis-ci-integration
For our commit guidelines, we are using Conventional Commits. Please strictly adhere to these conventions.
Allowed types:
- build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
- ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
- docs: Documentation only changes
- feat: A new feature
- fix: A bug fix
- perf: A code change that improves performance
- refactor: A code change that neither fixes a bug nor adds a feature
- release: Release-specific code changes
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- test: Adding missing tests or correcting existing tests
(based on Angular contribution guidelines)
To get a good paper trail and trace back any commits to their respective discussions, we reference each commit with the GitHub issue number that the commit is for. For that, put the issue number in parentheses with a hash prefix at the end of the commit description:
<type>[optional scope]: <description> (#<issue number>)
fix: webserver not serving `index.html` on baseUrl (#13)
To be able to identify the WHY behind a commit at a later point in time, we use the following template for our commit body:
<type>[optional scope]: <description> (#<issue number>)
because:
- [relevant context]
- [why you decided to change things]
- [reason you’re doing it now]
this commit:
- [does X]
- [does Y]
- [does Z]
— Source
When a pull request is approved, all the commits need to be squashed in a meaningful manner before the pull request is merged. That is, combining those commits that form a complete feature into one commit. That doesn’t necessarily mean that all the commits of every pull request should ever result in one single commit! For example, if a pull request provides a new feature but alongside this new feature, a bug was fixed, too, this would result in two sqashed commits: One for the feature and one for the bugfix. The aim of this practice is to produce a sensible fragmentation of commits so we can later automatically create our changelog from these commits.
If you feel unsure about this process, just ping @fuhlig or @csshugs in the comments of the pull request to request help. We’d love to do the squashing for you!
The following workflow assumes that there are no redundant commits and evey relevant feature is represented with one commit only.
- Merge
develop
intomaster
via GitHub pull request - Check out
master
branch locally - Run
npm run release
- Check
CHANGELOG.md
and fix content if necessary
4b. IfCHANGELOG.md
needed a manual change, rungit commit -a --amend --no-edit
- Run
git push origin master
- Run
git push --tags
- Run
npm publish
- Check out
develop
branch - Run
git rebase master
- Run
git push origin develop