ci(release): comment released-in version on merged PRs - #7814
Conversation
After a stable release is published, comment on each merged PR in the release range with a link to the release tag, so contributors can find which version shipped their change directly from the PR timeline. Collects PR numbers from squash-merge commit subjects between the previous and current stable tags, posts a marker-tagged comment, and skips PRs that already carry the marker (re-run safety). Nightly and preview releases are out of scope, since finalize only handles stable tags.
|
🔄 Qwen Triage is running — watch live progress. Stage results will post in this thread as they complete. 🔄 Qwen Triage 正在运行 —— 查看实时进度。各阶段结果完成后会更新在本线程。 |
|
Thanks for the PR! Template looks good ✓ Problem: This is a workflow improvement, not a bug fix — the gap is real and observable: once a PR is merged, there's no way to look at it and know which stable version shipped it. The PR notes it was opened per maintainer request, and the pattern (bot comment on PR timelines) is well-established in angular/babel/vue. Direction: Aligned. This is squarely within release infrastructure, purely additive, and doesn't touch any existing finalization behavior. No direction concerns. Size: Not applicable — no core module paths touched. Both changed files are CI workflow and its test. Approach: The scope is tight — one new workflow step plus one test asserting its structure. Every edit serves the stated goal. No unrelated changes, no drive-by refactors. The marker-based dedup and Moving on to code review. 🔍 中文说明感谢贡献! 模板完整 ✓ 问题:这是一个流程改进,不是 bug 修复——缺口是真实可观察的:PR 合并后,无法从 PR 页面得知它进了哪个稳定版本。PR 说明是按 maintainer 要求开启的,且 bot 评论模式在 angular/babel/vue 等项目中已是标准做法。 方向:对齐。完全属于发布基础设施范畴,纯新增,不改变任何既有收尾行为。无方向性顾虑。 规模:不适用——未触及核心模块路径。两个改动文件均为 CI workflow 及其测试。 方案:范围紧凑——一个新 workflow step 加一个结构断言测试。每处改动都服务于既定目标。无无关改动、无顺手重构。marker 去重和 进入代码审查 🔍 — Qwen Code · qwen3.8-max-preview Reviewed at |
Code ReviewIndependent proposal: For "tell me which release shipped my PR", I'd add a post-release step that enumerates PRs between two tags via Comparison with the diff: The PR's approach matches this exactly. The implementation is clean:
No critical blockers. No convention violations. The test follows the existing TestingThis is a CI workflow change with no user-visible runtime behavior — real-scenario tmux testing is N/A. CI evidence from the PR's own checks on
All completed checks passed. macOS/Windows tests and integration tests were skipped (expected for a CI-only change that doesn't touch runtime code). No failures. 中文说明代码审查独立方案: 对于"告诉我 PR 进了哪个版本",我会在发布后添加一个 step,通过 与 diff 对比: PR 的方案与此完全一致。实现干净:
无关键阻塞项。无规范违反。测试遵循文件中已有的 测试这是 CI workflow 改动,无用户可见的运行时行为——tmux 真实场景测试不适用。 CI 证据来自 PR 自身在 — Qwen Code · qwen3.8-max-preview Reviewed at |
|
Confidence: 5/5 — clean across every stage; would merge without hesitation. This is exactly the kind of PR that's easy to evaluate: small, focused, solves a real operational gap, and the implementation matches what I'd write independently. The squash-merge trailer parsing is precise, the idempotency story is solid (marker dedup + The author dry-ran the enumeration logic against real tags (137 PRs resolved for v0.20.1..v0.21.0), which is the right level of local validation for a workflow step that only fires on real releases. The ~300 API calls for a large release are well within rate limits, and the best-effort design means a partial failure degrades gracefully. Nothing to second-guess here. Ships the feature cleanly. 中文说明置信度:5/5 —— 每个阶段都干净;毫不犹豫可以合并。 这是一个容易评估的 PR:小、聚焦、解决真实的运营缺口,实现与我的独立方案一致。squash-merge 尾部解析精确,幂等方案扎实(marker 去重 + 作者用真实 tag 干跑了枚举逻辑(v0.20.1..v0.21.0 解析出 137 个 PR),对于只在真实发布时触发的 workflow step 来说,这是恰当的本地验证级别。大版本约 300 次 API 调用远在限额内,best-effort 设计意味着部分失败会优雅降级。 没有需要犹豫的地方。干净地交付了功能。 — Qwen Code · qwen3.8-max-preview Reviewed at |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Reviewed. Suggestions are inline.
中文说明
已审查。 建议见行内评论。
— qwen3.7-max via Qwen Code /review
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship — CI landed green after the review. ✅
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Reviewed. Suggestions are inline.
中文说明
已审查。 建议见行内评论。
— qwen3.7-max via Qwen Code /review
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
中文说明
— qwen3.7-max via Qwen Code /review
|
@qwen-code /triage |
|
Triage re-run completed without a new review.
The stage comments above were updated with the latest result. View workflow run. |
|
@qwen-code /triage |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship. ✅
doudouOUC
left a comment
There was a problem hiding this comment.
No issues found. LGTM! ✅
中文说明
未发现问题。LGTM!✅
— qwen3.7-max via Qwen Code /review
What this PR does
When a stable release is published, the release finalization job now leaves a short comment on every PR that landed in that release, linking to the release tag. The comment carries a hidden marker so it can be detected later, and posting it is best-effort — any failure (a number that resolves to an issue rather than a PR, a rate-limited call) is logged as a warning and never blocks the release.
Why it's needed
Once a PR is merged, there is no easy way to look at that PR and tell which stable version shipped it. Release notes answer "version → PR", but contributors usually want the reverse: "my PR → which release". Tagging PRs with per-version labels does not scale (one label per release forever), so a timestamped bot comment on the PR timeline is the standard pattern used by projects like angular/babel/vue, and it keeps the label namespace clean.
Reviewer Test Plan
How to verify
The step only runs on real stable releases, so the lightest confirmation path is:
tag = v0.20.1. The comment is marker-tagged and the merge-back PR is skipped when already merged, so re-running on a past tag is safe and idempotent.Evidence (Before & After)
N/A — non-UI change. The PR-timeline outcome is what the "How to verify" steps produce.
Tested on
The bash enumeration logic was dry-run locally against real tags (v0.20.1..v0.21.0 resolved 137 PRs; the empty-range path exits 0 cleanly). Actual comment posting only happens inside the ubuntu-latest runner.
Environment (optional)
N/A — change is to a GitHub Actions workflow; no local runtime involved.
Risk & Scope
gh pr view+ onegh pr commentper PR), well within the 5000/hr authenticated limit but visible in the run. Posting is best-effort withcontinue-on-error, so a partial failure never breaks the release.#NNNmatches that resolve to issues rather than PRs are tolerated —gh pr commentfails on them and the step logs a warning and continues.Linked Issues
None — opened per maintainer request.
中文说明
这个 PR 做什么
稳定版发布后,发布收尾任务会为该版本包含的每个 PR 留下一句简短评论,并附上 release tag 链接。评论带有一个隐藏 marker 以便后续识别;投递是 best-effort 的——任何失败(编号实为 issue 而非 PR、限流)只记为 warning,绝不阻塞发布。
为什么需要
PR 合并后,没有便捷的办法从 PR 反查它进了哪个稳定版本。Release notes 只回答「版本 → PR」,而贡献者通常要的是反方向「我的 PR → 哪个版本」。按版本打 label 不可持续(版本无限多),所以用带时间戳的 bot 评论记录在 PR timeline 上,是 angular/babel/vue 等项目的标准做法,也不污染 label 命名空间。
评审验证计划
如何验证
该 step 仅在真实稳定版发布时触发,最轻的验证路径是:
tag = v0.20.1手动触发收尾 workflow。评论带 marker,且回合 PR 在已合并时会被跳过,故对历史 tag 重跑是安全幂等的。证据(Before & After)
N/A —— 非 UI 改动。PR timeline 上的结果即「如何验证」步骤的产物。
测试平台
bash 枚举逻辑已在本地用真实 tag 干跑(v0.20.1..v0.21.0 解析出 137 个 PR;空范围路径干净退出 0)。实际评论投递只发生在 ubuntu-latest runner 内。
环境
N/A —— 改动为 GitHub Actions workflow,无本地运行时。
风险与范围
gh pr view+ 一次gh pr comment),远低于认证 5000/小时限额,但在 run 中可见。投递为 best-effort,带continue-on-error,部分失败绝不阻塞发布。#NNN若实为 issue 而非 PR 会被容忍——gh pr comment会失败,step 记 warning 后继续。关联 Issue
无——按 maintainer 要求开启。