Skip to main content

Githooks

warning

Always use correct names and always check for those files in your repository to exist before a commit.
If the branch and commit check are not executed, report the problem.

Description

The Crono-App application includes a commit/release management with Githooks.

Using CronoApp you will automatically have access to a series of features to check your brach-name and your commit name

The files for Githooks are in the current folder:

root-directory
โ””โ”€โ”€ .githooks

Local installation

Run this commands in your branch If It's not working:

    git config --local core.hooksPath .githooks
git config --local core.autocrlf false

If you're using a OSX you can have problems to use those file as executable, so for every file in the .githooks folder run:

    chmod +x "path_to_the_file"

All the needed informations for correct names are in those files and will be reported as errors when git commit will be executed

Rules

Branches valid formats


^(dev|test|main|((feature|fix)(_roadmap))#[[:digit:]]{1,})$

"feature_roadmap#<issue_number> => to implement a new feature related to a github object in roadmap"
"fix_roadmap#<issue_number> => to implement a new feature related to a github object in roadmap"
"feature#<issue_number> => to implement a new feature related to a github object in this repo"
"fix#<issue_number> => to implement a new feature related to a github object in this repo"

Commits valid format

Valid format rule:
^((:ci:|:docs:|:sec:|:perf:|:feature:|:chore:)[[:space:]][[:upper:]].+|(:fix:|:close:)[[:space:]](matchplat\/roadmap#|#)[[:digit:]]{1,})$

Valid formats:
:feature: <Short_description> => for new feature not related to a github object
:perf: <Short_description> => for performance improvements
:sec: <Short_description> => for security improvements
:docs: <Short_description> => for documentation
:ci: <Short_description> => for ci related features
:chore: <Short_description> => for code clean-up
:fix: matchplat/roadmap#<issue_number> => for bugfix related to an issue (bug) in roadmap
:fix: #<issue_number> => for bugfix related to an issue (bug) in this repo
:close: matchplat/roadmap#<issue_number> => for closing an issue related to a new implementation/enhancement in roadmap
:close: #<issue_number> => for closing an issue related to a new implementation/enhancement in this repo