xwillq/captains-hooks 问题修复 & 功能扩展

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

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

xwillq/captains-hooks

最新稳定版本:1.1.0

Composer 安装命令:

composer require xwillq/captains-hooks

包简介

Additional hooks for CaptainHook

README 文档

README

My hooks for Captain Hook.

Installation

Install with Composer:

composer require --dev xwillq/captains-hooks

Available hooks

FormatPHPFilesInCommit

Runs code formatter before commit, only formats changes that were staged and applies fixes to working tree. Uses Laravel Pint by default.

Can be used only as pre-commit hook. Configuration:

{
    "action": "\\Xwillq\\Hooks\\Hooks\\FormatPHPFilesInCommit",
    "options": {
        // Exclude files from formatting.
        "excluded-files": [
            // Specify file path.
            "src/FormatPHPFilesInCommit.php",
            // Patterns starting with / are treated as a regex.
            "/tests\/.*/",
            // Glob pattern.
            "config/*"
        ],
        // Command to execute. Placeholder `{}` gets replaced with path to file.
        // `vendor/bin/pint {}` is the default value.
        "formatter": "vendor/bin/pint {}"
    }
}

FixPHPStormMergeMessage

When merging, PHPStorm adds list of conflicts to commit message body as comments. This hook removes them.

Can be used only as prepare-commit-msg hook. Configuration:

{
    "action": "\\Xwillq\\Hooks\\Hooks\\FixPHPStormMergeMessage"
}

RemoveCommentsFromCommitMessage

Removes comments from commit message. Can be used to sanitize message before validation.

Can be used as pre-commit, prepare-commit-msg and commit-msg hook. Configuration:

{
    "action": "\\Xwillq\\Hooks\\Hooks\\RemoveCommentsFromCommitMessage"
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固