cuonggt/hooky

为 PHP 定制的有偏见的 git hooks 工具。

v0.1.0 2023-04-18 04:52 UTC

This package is auto-updated.

Last update: 2024-08-29 06:33:20 UTC


README

介绍

Hooky 是一个针对 PHP artisan 的有偏见的 git hooks 工具。Hooky 强烈受到 husky 的启发,使得在提交或推送时进行 检查提交信息代码检查运行测试 等操作变得简单。

安装

首先,使用 Composer 包管理器将 Hooky 安装到项目中

composer require --dev cuonggt/hooky

然后运行安装命令

vendor/bin/hooky install

使用方法

添加钩子

vendor/bin/hooky add .hooky/pre-commit "vendor/bin/phpunit"

提交

git add .hooky/pre-commit
git commit -m "Keep calm and commit"
# `vendor/bin/phpunit` will run

许可证

Hooky 是开源软件,许可协议为 MIT 许可证