gizra/robo-release-notes
Composer 安装命令:
composer require gizra/robo-release-notes
包简介
A Robo task for generating release notes from GitHub PRs and issues
README 文档
README
A Robo task for generating comprehensive release notes from GitHub PRs and issues.
Features
- Automatic PR Detection: Extracts pull request numbers from git commit messages using multiple merge strategies
- GitHub API Integration: Fetches detailed information about PRs and their associated issues
- Smart Grouping: Groups pull requests by their related issues for better organization
- Contributor Tracking: Automatically tracks contributors from both PR authors and issue reporters
- Code Statistics: Provides statistics on lines changed and files modified
- Flexible Tag Comparison: Compare from any tag or automatically use the latest tag
- Rate Limiting: Respects GitHub API rate limits with intelligent batching
Installation
Install via Composer:
composer require gizra/robo-release-notes
Usage
Basic Setup
- Include the trait in your RoboFile.php:
<?php use Gizra\RoboReleaseNotes\ReleaseNotesTasks; class RoboFile extends \Robo\Tasks { use ReleaseNotesTasks; }
- Set up environment variables:
export GITHUB_ACCESS_TOKEN="your_github_token" export GITHUB_USERNAME="your_github_username"
Command Usage
Generate release notes from the latest tag:
robo generate:release-notes
Generate release notes from a specific tag:
robo generate:release-notes v1.2.0
Environment Variables
| Variable | Description | Required |
|---|---|---|
GITHUB_ACCESS_TOKEN |
GitHub personal access token with repo access | Yes |
GITHUB_USERNAME |
Your GitHub username | Yes |
To create a GitHub personal access token:
- Go to GitHub Settings → Developer settings → Personal access tokens
- Generate a new token with
reposcope - Copy the token and set it as an environment variable
Sample Output
## Changelog - Implement user authentication system (#123) - Add login functionality (#145) - Add password reset feature (#146) - Implement session management (#147) - Fix payment processing bugs (#124) - Resolve credit card validation issues (#148) ### Other Changes - Update documentation (#149) - Refactor utility functions (#150) ## Contributors - @alice (5) - @bob (3) - @charlie (2) ## Code Statistics - Lines added: 1,234 - Lines deleted: 567 - Files changed: 23
How It Works
- Git Analysis: Scans git commits between the specified tag and HEAD
- PR Extraction: Uses regex patterns to extract PR numbers from commit messages
- GitHub API Calls: Fetches detailed PR and issue data from GitHub
- Issue Linking: Automatically links PRs to their associated issues using:
- Closing keywords (fixes, closes, resolves)
- Issue references in PR titles and descriptions
- Issue numbers in branch names
- Data Aggregation: Combines all data into a structured release notes format
Testing
Run the test suite:
composer test
Run code style checks:
composer cs
Fix code style issues:
composer cbf
Requirements
- PHP 7.4 or higher
- Robo 3.0 or 4.0
- cURL extension
- JSON extension
- Git repository with GitHub remote
- GitHub API access
Advanced Configuration
Custom GitHub API Endpoint
For GitHub Enterprise users, you can extend the ReleaseNotesGenerator class and override the githubApiGet method to use a custom API endpoint.
Custom Output Format
You can extend the ReleaseNotesGenerator class and override the displayReleaseNotes method to customize the output format.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
Changelog
See CHANGELOG.md for a complete list of changes.
gizra/robo-release-notes 适用场景与选型建议
gizra/robo-release-notes 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 31 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 09 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 gizra/robo-release-notes 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 gizra/robo-release-notes 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 31
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-09-21