bitexpert/captainhook-validateauthor
Composer 安装命令:
composer require bitexpert/captainhook-validateauthor
包简介
Captain Hook Plugin to check if commit author is valid (e.g. email in whitelist)
README 文档
README
This package provides an action for Captain Hook which will reject a commit when author name or email does not match a regex defined in the captainhook.json configuration file. Use this action if you want to make sure that your private email address does not end up in your companies' git repositories.
Installation
The preferred way of installing bitexpert/captainhook-validateauthor is through Composer.
You can add bitexpert/captainhook-validateauthor as a dev dependency, as follows:
composer.phar require --dev bitexpert/captainhook-validateauthor
Usage
Add the following code to your captainhook.json configuration file:
{
"pre-commit": {
"enabled": true,
"actions": [
{
"action": "\\bitExpert\\CaptainHook\\ValidateAuthor\\ValidateAuthorAction",
"options": {
"name": "/^[A-Za-z0-09]+$/",
"email": "/@example.com$/"
}
}
]
}
}
Captain Hook will now check on every commit if author name and email match the defined regex. If not, the commit will be canceled.
Contribute
Please feel free to fork and extend existing or add new features and send a pull request with your changes! To establish a consistent code quality, please provide unit tests for all your changes and adapt the documentation.
Want To Contribute?
If you feel that you have something to share, then we’d love to have you. Check out the contributing guide to find out how, as well as what we expect from you.
License
Captain Hook Validate Author Action is released under the Apache 2.0 license.
bitexpert/captainhook-validateauthor 适用场景与选型建议
bitexpert/captainhook-validateauthor 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 70.26k 次下载、GitHub Stars 达 7, 最近一次更新时间为 2019 年 04 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 bitexpert/captainhook-validateauthor 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bitexpert/captainhook-validateauthor 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 70.26k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2019-04-20