xwillq/captains-hooks
最新稳定版本:1.1.0
Composer 安装命令:
composer require xwillq/captains-hooks
包简介
Additional hooks for CaptainHook
关键字:
README 文档
README
My hooks for Captain Hook.
Installation
Install with Composer:
composer require --dev xwillq/captains-hooks
Available hooks
FormatPHPFilesInCommit
Runs code formatter before commit, only formats changes that were staged and applies fixes to working tree. Uses Laravel Pint by default.
Can be used only as pre-commit hook. Configuration:
{ "action": "\\Xwillq\\Hooks\\Hooks\\FormatPHPFilesInCommit", "options": { // Exclude files from formatting. "excluded-files": [ // Specify file path. "src/FormatPHPFilesInCommit.php", // Patterns starting with / are treated as a regex. "/tests\/.*/", // Glob pattern. "config/*" ], // Command to execute. Placeholder `{}` gets replaced with path to file. // `vendor/bin/pint {}` is the default value. "formatter": "vendor/bin/pint {}" } }
FixPHPStormMergeMessage
When merging, PHPStorm adds list of conflicts to commit message body as comments. This hook removes them.
Can be used only as prepare-commit-msg hook. Configuration:
{ "action": "\\Xwillq\\Hooks\\Hooks\\FixPHPStormMergeMessage" }
RemoveCommentsFromCommitMessage
Removes comments from commit message. Can be used to sanitize message before validation.
Can be used as pre-commit, prepare-commit-msg and commit-msg hook.
Configuration:
{ "action": "\\Xwillq\\Hooks\\Hooks\\RemoveCommentsFromCommitMessage" }
统计信息
- 总下载量: 557
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-09-04