承接 purplebooth/git-github-lint 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

purplebooth/git-github-lint

Composer 安装命令:

composer create-project purplebooth/git-github-lint

包简介

Lint github commits and update their status

README 文档

README

Scrutinizer Code Quality Build Status Dependency Status Latest Stable Version License

This project is designed to ensure that the commits you're making to a repository follow the git coding style. This is the library component with no web frontend.

The standard that they test for is the one described by Chris Beams.

The validations it implements are:

  • Separate subject from body with a blank line
  • Limit the subject line to 50 characters (soft limit, hard limit at 69)
  • Capitalize the subject line
  • Do not end the subject line with a period
  • Wrap the body at 72 characters

Getting Started

Prerequisities

You'll need to install:

  • PHP (Minimum 7.0)

Installing

composer require PurpleBooth/git-github-lint

Usage

Tool

You can try out this library by using it as a tool. You'll need to generate a token on the GitHub Personal Access Token Page.

Usage


Billies-MacBook-Pro-2:git-github-lint billie$ bin/git-github-lint help git-github-lint:pr
Usage:
  git-github-lint:pr [options] [--] <github-username> <github-repository> <pull-request-id>

Arguments:
  github-username       GitHub Username
  github-repository     GitHub Repository
  pull-request-id       The ID of the pull request

Options:
  -t, --token=TOKEN     The token to authenticate to the API with.
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
 Evaluates a the commits in a pull request and checks that their messages match the style advised by Git. It will then update the "status" in github (that little dot next to the commits).


 Here are some good articles on commit message style:

 * http://chris.beams.io/posts/git-commit/
 * https://git-scm.com/book/ch5-2.html#Commit-Guidelines
 * https://github.com/blog/926-shiny-new-commit-styles


Output While Running

$ php vendor/bin/git-github-lint git-github-lint:pr \
                                 -t my-token \
                                 PurpleBooth \
                                 git-github-lint \
                                 3

git-github-lint:pr
==================

 // Analysing PR PurpleBooth/git-github-lint#3


 [OK] Finished!

You can look at the pull requests on this repo to see what the effect is like in person.

Library

You can use the whole library

<?php

$gitHubClient = new \Github\Client()

/** @var GitHubLint $gitHubLint **/
$gitHubLint = new GitHubLintImplementation($gitHubClient);
$gitHubLint->analyse('PurpleBooth', 'git-github-lint', 3);
// -> The commits on your PR should now be updated with a status

Please depend on the interfaces rather than the concrete implementations. Concrete implementations may change without causing a BC break, interfaces changing will cause major version increment, indicating a BC break.

Running the tests

To run the tests for coding style

First checkout the library, then run

composer install

Coding Style

We follow PSR2, and also enforce PHPDocs on all functions

vendor/bin/phpcs -p --standard=psr2 src/ spec/

Unit tests

We use PHPSpec for unit tests

vendor/bin/phpspec run

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

purplebooth/git-github-lint 适用场景与选型建议

purplebooth/git-github-lint 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 0, 最近一次更新时间为 2016 年 08 月 02 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 purplebooth/git-github-lint 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 purplebooth/git-github-lint 我们能提供哪些服务?
定制开发 / 二次开发

基于 purplebooth/git-github-lint 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-08-02