bdelespierre/gitstats
Composer 安装命令:
composer require bdelespierre/gitstats
包简介
Iterate through git commits to gather statistics
README 文档
README
Rewinds your Git history to compute stats.
Installation
composer global require bdelespierre/gitstats
Add composer global vendor/bin directory to your PATH
Best way to do it is to add these lines to your ~/.profile:
# Composer 1 global vendor/bin to PATH if [ -d "$HOME/.composer/vendor/bin" ] ; then PATH="$PATH:$HOME/.composer/vendor/bin" fi # Composer 2 global vendor/bin to PATH if [ -d "$HOME/.config/composer/vendor/bin" ] ; then PATH="$PATH:$HOME/.config/composer/vendor/bin" fi export PATH
Usage
Add a .gitstats.php file in your project root directory:
<?php return [ 'tasks' => [ 'Commit message' => "git log -1 --pretty=%B | head -n 1", 'Commit author' => "git log -1 --pretty=%an", 'Number of files' => "find . -type f | wc -l", 'Number of directories' => "find . -type d | wc -l", ], ];
Run the application:
gitstats run
The output is formatted as CSV:
commit,date,"Commit message","Commit author","Number of files","Number of directories" 0e75bcac756226986f9e6ba745c0f1944ee482db,"2021-04-01 12:40:04","Major refactoring","Benjamin Delespierre",1647,398 1cd263613b1b3bb96bff86a04c0e0c42c9427f32,"2018-01-14 11:15:16","Add progress screenshot","Matthieu Napoli",1649,396 3159438bd963174acac8518d9d58e85fc5fb431f,"2018-01-10 11:48:56","Restrict dependencies correctly","Matthieu Napoli",1649,396 2dd0cf355552553eebc3614ada24c305393c628c,"2018-01-10 11:48:09","Show a progress bar","Matthieu Napoli",1649,396 a731d6c9d91c8e4f07db0bec6e22c912a55baef2,"2017-10-22 18:02:03","MIT License","Matthieu Napoli",1649,396 ...
You can write the output to a file:
gitstats run > gistats.csv
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email :author_email instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
bdelespierre/gitstats 适用场景与选型建议
bdelespierre/gitstats 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 04 月 01 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 bdelespierre/gitstats 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bdelespierre/gitstats 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-04-01