ivuorinen/branch-usage-checker
最新稳定版本:0.1.1
Composer 安装命令:
composer create-project ivuorinen/branch-usage-checker
包简介
GitHub Project branch usage checker.
README 文档
README
A CLI tool that cross-references GitHub branches with Packagist download statistics to identify branches safe to delete. Configure a lookback window (default 9 months), review a statistics table of per-branch downloads, and get a suggestion list of zero-download branches you can clean up.
Requirements
- PHP 8.4+
Installation
Composer (global)
composer global require ivuorinen/branch-usage-checker
PHAR
Download the latest branch-usage-checker PHAR from
GitHub Releases, then:
chmod +x branch-usage-checker ./branch-usage-checker check <vendor/package>
Usage
branch-usage-checker check <vendor/package> [months]
| Argument | Description | Default |
|---|---|---|
vendor/package |
Packagist package name | |
months |
Months to look back | 9 |
Example
$ branch-usage-checker check ivuorinen/branch-usage-checker 6
Branch usage statistics for ivuorinen/branch-usage-checker
┌────────────────────┬────────┬────────┬────────┬────────┬────────┬────────┐
│ Branch │ 2025-7 │ 2025-8 │ 2025-9 │ 2025-… │ 2025-… │ 2025-… │
├────────────────────┼────────┼────────┼────────┼────────┼────────┼────────┤
│ dev-master │ 42 │ 38 │ 51 │ 47 │ 55 │ 60 │
│ dev-feat/dto │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │
│ dev-fix/timeouts │ 3 │ 1 │ 0 │ 0 │ 0 │ 0 │
└────────────────────┴────────┴────────┴────────┴────────┴────────┴────────┘
Suggestions — branches with zero downloads (safe to delete)
┌────────────────────┐
│ Branch │
├────────────────────┤
│ dev-feat/dto │
└────────────────────┘
Development
git clone https://github.com/ivuorinen/branch-usage-checker.git
cd branch-usage-checker
composer install
| Command | Description |
|---|---|
composer test |
Run tests (Pest) |
composer lint |
Check code style (PHPCS, PSR-12) |
composer format |
Auto-fix code style (PHPCBF) |
composer build |
Build PHAR to builds/ |
Pre-commit hooks (CaptainHook) are installed automatically and will run PHPCBF + PHPCS on staged PHP files.
License
MIT — see LICENSE for details.
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-10-17