synchot / 传统提交
v5.0.5
2020-01-24 14:54 UTC
Requires
- php: >=7.1
Requires (Dev)
- codeception/codeception: 4.0.x-dev
- codeception/module-asserts: dev-master
- composer/composer: ^1.10@dev
- myclabs/php-enum: ^1.7
- symfony/console: ^2.0.5|^3.0|^4.0|^5.0
- symfony/filesystem: ^4.4.2
- symfony/yaml: ^4.3
- synchot/changeloggen: ^4.0
- webmozart/assert: dev-master
- dev-master
- v5.0.5
- v5.0.4
- v5.0.3
- v5.0.2
- v5.0.1
- v5.0.0
- v4.5.5
- v4.5.4
- v4.5.3
- v4.5.2
- v4.5.1
- v4.5.0
- v4.4.0
- v4.3.0
- v4.2.0
- v4.1.0
- v4.0.4
- v4.0.3
- v4.0.2
- v4.0.1
- v4.0.0
- v3.0.1
- v3.0.0
- v2.0.14
- v2.0.13
- v2.0.12
- v2.0.11
- v2.0.10
- v2.0.9
- v2.0.8
- v2.0.7
- v2.0.6
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.2
- v2.0.1
- v2.0.0
- dev-develop
- dev-4-small-refactor
- dev-2-unit-tests
This package is auto-updated.
Last update: 2024-09-25 02:31:36 UTC
README
此包将使用 .git/hooks/commit-msg 来检查 git commit -m "您的消息" 是否符合传统提交规范。
安装
添加到 composer.json
"scripts": {
"post-install-cmd": [
"SyncHot\\ConventionalCommit\\Services\\ComposerBuild::copyHooks"
],
"post-update-cmd": [
"SyncHot\\ConventionalCommit\\Services\\ComposerBuild::copyHooks"
]
}
运行
composer require --dev synchot/conventionalcommit
如何运行
在Windows机器上,请选择git-bash作为默认控制台。
git commit -m "Some message"
发生错误
在您的项目中
cat .git/hooks/commit-msg
如果其值与 vendor/synchot/conventionalcommit/resources/commit-msg 中的值相同,那么您就可以继续了,否则尝试复制此值。
用户自定义配置
创建 /config/packages/conventionalcommit.yaml
内容为
/vendor/synchot/conventionalcommit/config/conventionalcommit.yaml
修改所有值以满足您项目的需求。
移除此插件
cd <your project dir>
cd .git/hooks
rm commit-msg
变更日志
https://bitbucket.org/SyncHot/conventionalcommit/src/master/CHANGELOG.md
待办事项
- 重构
- 编写测试
许可协议
MIT Jędra Marcin