Releases: captainhookphp/captainhook
Releases · captainhookphp/captainhook
5.16.3
Changes
- Fix broken git dependency
5.16.2
Changes
- Add diff filter to conditions
- Fix test coverage
5.16.1
Changes
- Make sure to not add empty lines at the beginning of message subject or body
5.16.0
Changes
- Add issue key injection action
- Add new file condition
- Skip all hooks in CI environments
- Fix
PrepareFromFile
action
The new condition allows to extract issue keys from branch names and append or prepend the key to the commit message subject or body.
The following example will extract JIRA issue keys and append them at the end of the commit message.
{
"action": "\\CaptainHook\\App\\Hook\\Message\\Action\\InjectIssueKeyFromBranch"
"options": {
"regex": "#([A-Z]+\\-[0-9]+)#i",
"into": "body",
"mode": "append",
"prefix": "\\n\\nIssue: "
}
}
Commit message before
This is some nice change
This is a more thorough description of what was changed
so people can understand why the change was done this way.
Commit message after
This is some nice change
This is a more thorough description of what was changed
so people can understand why the change was done this way.
Issue: PROJKEY-1234567
5.15.6
Changes
- BUGFIX: Don't overwrite externally changed msg file
- Improved output
Using CLI actions to prepare commit messages did not work because of an afterAction
issue.
The issue was fixed and you can now prepare a commit message with any CLI command.
5.15.5
Changes
- Add --only-enabled option to installer (by Matthieu CODRON)
5.15.4
Changes
- Add CHANGED_FILES placeholder
- Allow all usage of all ChangedFile Conditions within pre-push hooks
5.15.3
Changes
- Add protected branches option to
BlockFixupAndSquashCommits
Action - Allowed passing multiple hooks for installation (hook argument) via comma (by Olexandr Mazur)