claudiodekker/changelog-updater
Composer 安装命令:
composer require claudiodekker/changelog-updater
包简介
A PHP package to programmatically update your changelog file.
README 文档
README
A PHP library to programmatically update changelogs based on the "Keep a Changelog" 1.0.0 format.
Usage
GitHub Action
This library can be used as a GitHub Action to automatically update your changelog when a pull request is merged. You can see an example of what this looks like here. To set up the GitHub Action, follow the steps below:
-
Create a new file in your repository at
.github/workflows/update_changelog.yml -
Copy the following content into the
update_changelog.ymlfile:name: Update Changelog on PR Merge on: pull_request_target: types: - closed jobs: update-changelog: name: Update Changelog runs-on: ubuntu-latest if: github.event.pull_request.merged == true permissions: contents: write steps: - name: Checkout code uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.base.ref }} fetch-depth: 0 - name: Determine changelog section to update id: sections run: | section="" labels=$(echo '${{ toJSON(github.event.pull_request.labels.*.name) }}' | jq -r '.[]') for label in $labels; do lower_label=$(echo "$label" | tr '[:upper:]' '[:lower:]') case "$lower_label" in enhancement|feature) section="Added"; break;; bug|bugfix|fix|patch) section="Fixed"; break;; change) section="Changed"; break;; optimization|improvement|performance|refactor) section="Optimized"; break;; deprecation|deprecated) section="Deprecated"; break;; revert) section="Reverted"; break;; removal) section="Removed"; break;; security) section="Security"; break;; esac done if [ -z "$section" ]; then echo "No matching label found for changelog entry, skipping changelog update." exit 0 else echo "section=$section" >> $GITHUB_OUTPUT fi - name: Add entry to CHANGELOG.md if: steps.sections.outputs.section != '' uses: claudiodekker/changelog-updater@master with: section: "${{ steps.sections.outputs.section }}" entry-text: "${{ github.event.pull_request.title }}" entry-link: "${{ github.event.pull_request.html_url }}" - name: Commit updated CHANGELOG if: steps.sections.outputs.section != '' uses: stefanzweifel/git-auto-commit-action@v4 with: branch: ${{ github.event.pull_request.base.ref }} commit_message: "Update CHANGELOG.md w/ PR #${{ github.event.pull_request.number }}" file_pattern: CHANGELOG.md
-
Commit and push the file to your repository.
Once done, the GitHub Action will automatically update your changelog when a pull request with a matching label is merged.
claudiodekker/changelog-updater 适用场景与选型建议
claudiodekker/changelog-updater 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 15.59k 次下载、GitHub Stars 达 13, 最近一次更新时间为 2023 年 04 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「manager」 「modify」 「updater」 「changelog」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 claudiodekker/changelog-updater 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 claudiodekker/changelog-updater 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 claudiodekker/changelog-updater 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
The file manager intended for using Laravel with CKEditor / TinyMCE / Colorbox
Simple package to write environment
A Laravel package that intercepts and help you customize, remove or modify the meta data on your eloquent api resource response.
URI utils to make work with them easy
KCFinder web file manager
Publish / Subscribe / Event Manager
统计信息
- 总下载量: 15.59k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 13
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-04-11