Download the PHP package rugaard/git-hooks-workflow without Composer
On this page you can find all versions of the php package rugaard/git-hooks-workflow. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rugaard/git-hooks-workflow
More information about rugaard/git-hooks-workflow
Files in rugaard/git-hooks-workflow
Package git-hooks-workflow
Short Description Workflow related Git hooks.
License MIT
Homepage https://github.com/rugaard
Informations about the package git-hooks-workflow
🪝 Git Hooks for workflow 
This is a "plugin" package which seamlessly integrates with the Git Hooks package.
It will install git hooks, that will automatically run multiple checks on your project to make sure, they follow the projects workflow and naming conventions.
📦 Installation
You install the package via Composer by using the following command:
📝 Configuration
To change the default configuration of one or more script, you need to have a git-hooks.config.json file in your project root. If you don't, you can create it with the following command:
Rugaard\GitHooks\Workflow\CommitMsg\IssueReferenceCommand
Checks the commit for an issue reference. Default is GitHub format.
If commit message does not contain an issue reference, the branch name will be checked to see, if an issue reference can be extracted.
| Parameter | Description | Default |
|---|---|---|
branchPattern |
Regex pattern to search branch name for issue reference. | .*\/#?([0-9]+)- |
commitPattern |
Regex pattern to search commit message for issue reference. | #([0-9]+) |
forcePrefix |
Make sure issue reference is always prefixed with this value. | # |
Rugaard\GitHooks\Workflow\PreCommit\BranchNameCommand
Checks the current branch name and make sure it follows the projects naming convention.
| Parameter | Description | Default |
|---|---|---|
pattern |
Regex pattern to validate branch name | ^(bugfix\|feature\|hotfix\|release)\/(\d+)-([A-Za-z0-9-]+)$ |
renameExample |
Format of branch naming convention | {type}/{issue-no}-{description} |
whitelist |
Array of branch names that skips this check. | ['main', 'master', 'develop'] |
🚓 License
This package is licensed under MIT.