webgriffe/captainhook 问题修复 & 功能扩展

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

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

webgriffe/captainhook

最新稳定版本:2.1.0

Composer 安装命令:

composer require webgriffe/captainhook

包简介

Provides some useful custom actions to be used with Captain Hook (a PHP GIT hooks library)

README 文档

README

A collection of useful conditions and actions to be used with CaptainHook.

Build Status

Install

Given that you already have CaptainHook in your project you can simply use Composer to have these webgriffe/captainhook actions available:

composer require --dev webgriffe/captainhook

Actions

Here follows the list of implemented actions.

1. Prevent forced push on protected branches

For example, you can prevent forced push on master branch with the following CaptainHook's config:

    // captainhook.json
    // ...
    "pre-push": {
        "enabled": true,
        "actions": [
            {
                "action": "\\Webgriffe\\CaptainHook\\PreventPushForce",
                "options": {"protected-branches": ["master"]}
            }
        ]
    }
    // ...

You can use the protected-branches option to add other branches to the protected branches list.

2. Prevent commit if the diff is included in the message

    // captainhook.json
    // ...
    "commit-msg": {
        "enabled": true,
        "actions": [
            {
                "action": "\\Webgriffe\\CaptainHook\\PreventCommitMessageWithDiff"
            }
        ]
    },
    // ...

3. Prevent commit if some files have the same name but different case

    // captainhook.json
    // ...
    "commit-msg": {
        "enabled": true,
        "actions": [
            {
                "action": "\\Webgriffe\\CaptainHook\\PreventCommitCaseSensitiveSameFilename"
            }
        ]
    },
    // ...

License

This library is under the MIT license. See the complete license in the LICENSE file.

Credits

Developed by Webgriffe®.

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 未知

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固