bitexpert/captainhook-validateauthor 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bitexpert/captainhook-validateauthor

最新稳定版本:v0.9.0

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.

Build Status Coverage Status Mastodon Follow

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.

统计信息

  • 总下载量: 61.38k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 3
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2019-04-20