Conversation
There was a problem hiding this comment.
你好——我发现了 1 个问题
面向 AI Agent 的提示
请处理此次代码审查中的评论:
## 单独评论
### 评论 1
<location path=".github/workflows/release.yml" line_range="45-47" />
<code_context>
+ if: >-
+ github.event_name == 'pull_request' &&
+ github.event.action != 'closed' &&
+ (contains(github.event.pull_request.labels.*.name, 'release') ||
+ startsWith(github.event.pull_request.head.ref, 'release-prep/')) &&
+ github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
- outputs:
</code_context>
<issue_to_address>
**小问题:** Release Readiness 作业会对任何头部分支以 `release-prep/` 开头的同仓库 PR 运行,即使该 PR 没有 `release` 标签。这与所述的显式标签触发条件相矛盾,并导致未添加标签的发布准备分支也会接收特定于发布的验证和状态检查。
**触发场景:** 同仓库 PR 使用以 `release-prep/` 开头的头部分支,但尚未添加 `release` 标签时。
**建议修复:** 在作业条件中要求存在 `release` 标签,或移除 `startsWith(github.event.pull_request.head.ref, 'release-prep/')` 这一备选条件。
</issue_to_address>Original comment in English
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".github/workflows/release.yml" line_range="45-47" />
<code_context>
+ if: >-
+ github.event_name == 'pull_request' &&
+ github.event.action != 'closed' &&
+ (contains(github.event.pull_request.labels.*.name, 'release') ||
+ startsWith(github.event.pull_request.head.ref, 'release-prep/')) &&
+ github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
- outputs:
</code_context>
<issue_to_address>
**nitpick:** The Release Readiness job runs for any same-repository PR whose head branch starts with `release-prep/`, even when the PR has no `release` label. This contradicts the stated explicit-label trigger and causes unlabelled release-preparation branches to receive release-specific validation and status checks.
**Triggers:** When a same-repository PR uses a `release-prep/` head branch before the `release` label is added.
**Suggested fix:** Require the `release` label in the job condition, or remove the `startsWith(github.event.pull_request.head.ref, 'release-prep/')` alternative.
</issue_to_address>| (contains(github.event.pull_request.labels.*.name, 'release') || | ||
| startsWith(github.event.pull_request.head.ref, 'release-prep/')) && | ||
| github.event.pull_request.head.repo.full_name == github.repository |
There was a problem hiding this comment.
小问题: Release Readiness 作业会对任何头部分支以 release-prep/ 开头的同仓库 PR 运行,即使该 PR 没有 release 标签。这与所述的显式标签触发条件相矛盾,并导致未添加标签的发布准备分支也会接收特定于发布的验证和状态检查。
触发场景: 同仓库 PR 使用以 release-prep/ 开头的头部分支,但尚未添加 release 标签时。
建议修复: 在作业条件中要求存在 release 标签,或移除 startsWith(github.event.pull_request.head.ref, 'release-prep/') 这一备选条件。
Original comment in English
nitpick: The Release Readiness job runs for any same-repository PR whose head branch starts with release-prep/, even when the PR has no release label. This contradicts the stated explicit-label trigger and causes unlabelled release-preparation branches to receive release-specific validation and status checks.
Triggers: When a same-repository PR uses a release-prep/ head branch before the release label is added.
Suggested fix: Require the release label in the job condition, or remove the startsWith(github.event.pull_request.head.ref, 'release-prep/') alternative.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #580 +/- ##
==========================================
+ Coverage 72.07% 72.59% +0.52%
==========================================
Files 72 72
Lines 6679 6759 +80
Branches 6679 6759 +80
==========================================
+ Hits 4814 4907 +93
- Misses 1523 1557 +34
+ Partials 342 295 -47 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Stable 发布现在由带
release标签的同仓库 PR 合入main明确触发。版本和 changelog 在 PR 中一起审核,普通版本 bump 不再触发发布;已单独更新版本时,可以创建只更新 changelog 的 release PR。Prepare Stable Release,支持auto、patch、minor、major和指定版本,使用 git-cliff 2.13.1 推导版本和生成 changelog。PR 检查及实际合并后的发布检查都会拒绝过期的 changelog。MAA_VERSION注入版本,不修改 main 的 Cargo.toml、Cargo.lock 或 changelog。编号由已发布索引维护;Beta tag 或 Nightly 发布超前于索引时,先恢复索引再分配序号。version分支,拒绝 tag 冲突及旧发布覆盖较新索引。验证:
cargo +nightly fmt、cargo clippy -p xtask --all-targets --locked -- -D warnings和cargo test -p xtask --locked通过,xtask 共 21 项测试。cargo x test --no-core-tests、Markdown lint 和git diff --check通过。完整cargo x test因本机找不到 MaaCore 停在初始化。concurrency.queue字段诊断后通过;AUR 工作流仅做 actionlint 结构检查,未处理其原有内联 shell 警告。新下游索引检查脚本已用真实 GitHub API 做只读验证。尚未运行真实 GitHub Actions 发布。启用自动创建 release PR 前,需要在仓库设置中开启
Allow GitHub Actions to create and approve pull requests;本 PR 不修改该设置,也不更新源码版本或 changelog。Sourcery 总结
采用由带有
release标签的稳定版发布 PR 和不可变发布制品驱动的、明确、可审查且可恢复的发布流程。新功能:
Bug 修复:
改进:
release标签的 PR 才能触发稳定版发布,并在发布前验证最终合并的变更日志。CI:
文档:
测试:
维护:
Original summary in English
Summary by Sourcery
Adopt an explicit, reviewable, and recoverable release process driven by labeled stable release PRs and immutable publication artifacts.
New Features:
Bug Fixes:
Enhancements:
CI:
Documentation:
Tests:
Chores: