plotbox-io/php-git-ops 问题修复 & 功能扩展

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

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

plotbox-io/php-git-ops

最新稳定版本:v0.2.2

Composer 安装命令:

composer require plotbox-io/php-git-ops

包简介

PHP wrapper around git designed to help with dev-ops needs

README 文档

README

PHP wrapper around git designed to help with dev-ops needs. Provides classes that can be composed in various ways to perform some advanced logic.

One core use-case is ability to filter code style issues by file and line number so that issues found, but not touched on the current branch, are filtered out. This can help a lot when dealing with legacy code-bases where you want to tackle code smells bit by bit.

NOTE: Currently in early stage of development (Potentially subject to breaking changes)

Example Usage

Filter issues by 'lines touched' in current branch

The logic will consider files added, and modified (unstaged, staged, comitted), filtering out any issues deemed to not have been touched in the current branch

// Get modifications for feature branch
$git = new Git('/home/richard/Development/PlotBox/plotbox-app');
$branchModificationsFactory = new BranchModificationsFactory($git);
$branchModifications = $branchModificationsFactory->getBranchModifications();
$lineFilter = new LineFilter($git, $branchModifications);

// Pass in ci-issues to be filtered
$issues = [
    CodeIssue::make('devops/git/post-merge', 123, 'abc123'),
    CodeIssue::make('static/maintenance.html', 456, 'abc456')
];
$filteredIssues = $lineFilter->filterIssues($issues);

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.

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-03-31