# Rules of Contributing
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

---

## Main Branches

This repository holds two main branches with an infinite lifetime:

* ```master``` 
* ```development``` 

The ```master``` branch should be familiar to every Git user. Another branch parallel to the ```master``` branch is called ```developement```.

The ```master``` branch is the main branch where the source code of HEAD always reflects a **_production-ready_** state.

The ```development``` branch is the main branch where the source code of HEAD always reflects a state with the latest delivered development changes for the next release. Some would call this the “integration branch”. 

When the source code in the ```development``` branch reaches a stable point and is ready to be released, all of the changes should be merged back into ```master``` somehow and then tagged with a release number. Therefore, each time when changes are merged back into ```master```, this is a new production release by definition. 

## Supporting Branches 

Next to the main branches ```master``` and ```development```, our development model also uses a variety of supporting branches to aid parallel development between team members, ease tracking of features, prepare for production releases and to assist in quickly fixing live production problems. Unlike the main branches, these branches always have a limited life time, since they will be removed eventually.

The different types of branches you may find are:

- Feature branches
- Release branches
- Hotfix branches

Each of these branches have a specific purpose and are bound to strict rules as to which branches may be their originating branch and which branches must be their merge targets. These branches are not _"special"_ from a technical perspective. The are categorized by how we use them or plan to use them and therefore they are of course plain old Git branches.

---

### Rules of Feature Branches

A Feature branch 

- **may** branch off from ```development```
- **must** merge back into ```development```
- should be named anything meaningful except ```master```, ```development```, ```release-*```, or ```hotfix-*```

Feature branches a.k.a topic branches are used to develop new features for the upcoming or a distant future release. When starting development of a feature, the target release in which this feature will be incorporated may well be unknown at that point. The essence of a feature branch is that it exists as long as the feature is in development, but will eventually be merged back into ```development``` (to definitely add the new feature to the upcoming release) or discarded (in case of a disappointing experiment).

###### _Credit: [NVIE - Git Branching Model](https://nvie.com/posts/a-successful-git-branching-model/)_

---

### Rules of Release Branches

A Release branch 

- **may** branch off from ```development```
- **must** merge back into ```development``` and ```master``` 
- **must** be named ```release-*```

Release branches support preparation of a new production release. They allow for last-minute dotting of i’s and crossing t’s. Furthermore, they allow for minor bug fixes and preparing meta-data for a release (version number, build dates, etc.). By doing all of this work on a release branch, the ```development``` branch is cleared to receive features for the next big release.

The key moment to branch off a new release branch from ```development``` is when ```development``` (almost) reflects the desired state of the new release. At least all features that are targeted for the release-to-be-built must be merged in to develop at this point in time. All features targeted at future releases may not — they must wait until after the release branch is branched off.

It is exactly at the start of a release branch that the upcoming release gets assigned a version number—not any earlier. Up until that moment, the ```development``` branch reflected changes for the “next release”, but it is unclear whether that “next release” will eventually become 0.3 or 1.0, until the release branch is started. That decision is made on the start of the release branch and is carried out by the project’s rules on version number bumping.

###### _Credit: [NVIE - Git Branching Model](https://nvie.com/posts/a-successful-git-branching-model/)_

--- 

### Rules of Hotfix Branches

A Hotfix branch 

- **may** branch off from ```master```
- **must** merge back into ```development``` and ```master``` 
- **must** be named ```hostfix-*```

Hotfix branches are very much like release branches in that they are also meant to prepare for a new production release, albeit unplanned. They arise from the necessity to act immediately upon an undesired state of a live production version. When a critical bug in a production version must be resolved immediately, a hotfix branch may be branched off from the corresponding tag on the ```master``` branch that marks the production version.

The essence is that work of team members (on the ```development``` branch) can continue, while another person is preparing a quick production fix.

###### _Credit: [NVIE - Git Branching Model](https://nvie.com/posts/a-successful-git-branching-model/)_

--- 

### Basics of Contributing

1. Create an issue and describe your ideas.
2. After discussing your ideas with the owners of this repository, create your feature branch from ```development branch```.
3. Commit your implementations to your ```feature branch```.
4. Merge your ```feature branch``` to ```development branch```.
5. Create a new ```Pull Request```.

### Pull Request Process
1. Do **_not_** push straight to ```master```.
2. Do **_not_** commit code as an unrecognized author. All commit code must be signed with author's PGP/GPG key.
3. Do **_not_** leak secrets into source control.
4. Do **_not_** commit dependencies into source control. 
    - Ensure any install or build dependencies are removed before the end of the layer when doing a build.
5. Do **_not_** commit local config files into source control. 
6. Update the ```CHANGELOG.md``` with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters.
7. You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you.

--- 

## Code of Conduct
### Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.


### Our Standards
Examples of behavior that contributes to creating a positive environment include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

### Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

### Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

### Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [INSERT EMAIL ADDRESS]. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

### Attribution
This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at http://contributor-covenant.org/version/1/4
