Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 2.38 KB

CONTRIBUTING.md

File metadata and controls

50 lines (37 loc) · 2.38 KB

Contributing

We are happy to receive contributions to ViSTA in the form of merge requests via Github. Feel free to fork the repository, implement your changes and create a merge request to the develop branch.

Bugs should be reported via Github issues.

The master branch should always contain stable code. New features and bug fixes are implemented in feature/* branches and are merged to develop once they are finished. When a new milestone is reached, the content of develop will be merged to master.

Style guide

Your contributions should follow the ViSTA style guide (latex source is located in VistaCoreLibs/Documentation) as closely as possible.

Git Commit Messages

Commits should start with a Capital letter and should be written in present tense (e.g. 🎉 Add cool new feature instead of 🎉 Added cool new feature). It's a great idea to start the commit message with an applicable emoji. This does not only look great but also makes you rethink what to add to a commit.

  • 🎉 :tada: when when adding a cool new feature
  • 🔧 :wrench: when refactoring / improving a small piece of code
  • 🔨 :hammer: when refactoring / improving large parts of the code
  • :sparkles: when applying clang-format
  • 🎨 :art: improving / adding assets like textures or 3D-models
  • 🚀 :rocket: when improving performance
  • 📝 :memo: when writing docs
  • 🪲 :beetle: when fixing a bug
  • 💚 :green_heart: when fixing the CI build
  • 🔼 :arrow_up_small: when adding / upgrading dependencies
  • 🔽 :arrow_down_small: when removing / downgrading dependencies
  • 🔥 :fire: when removing files
  • 🚚 :truck: when moving / renaming files or namespaces

A good way to enforce this on your side is to use a commit-hook. To do this, paste the following script into .git/hooks/commit-msg.

#!/bin/bash

# regex to validate in commit msg
commit_regex='(:(tada|wrench|hammer|sparkles|art|rocket|memo|beetle|green_heart|arrow_up_small|arrow_down_small|fire|truck):(.+))'
error_msg="Aborting commit. Your commit message is missing an emoji as described in CONTRIBUTING.md"

if ! grep -xqE "$commit_regex" "$1"; then
    echo "$error_msg" >&2
    exit 1
fi

And make sure that it is executable:

chmod +x .git/hooks/commit-msg