chore: add .github/release.yml to support skip-changelog label#4327
Conversation
📋 Review SummaryThis PR adds a 🔍 General Feedback
🎯 Specific Feedback🔵 Low
✅ Highlights
|
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
pomelo-nwu
left a comment
There was a problem hiding this comment.
LGTM 🎉
验证情况
- ✅ Schema 符合 GitHub 官方文档 的
changelog.exclude.labels结构 - ✅
.github/workflows/release.yml里用的是gh release create ... --generate-notes,会自动读取这份配置,生效路径已打通 - ✅ 不会和现有 release 流程冲突;没打 label 的 PR 行为完全不变
- ✅ 风险几乎为零:配置缺失即 GitHub 默认行为,本次新增只多一条 exclude 规则
一点提醒(不阻塞合并)
skip-changeloglabel 当前还不存在,合并后需要在仓库 Settings → Labels 创建,或一行命令搞定:gh label create skip-changelog --color BFD4F2 --description "Exclude this PR from auto-generated release notes"- (可选 follow-up)未来可考虑加
categories配置,把 release notes 按 feat / fix / chore 等分组,可读性会更好。本 PR 不必扩大范围。
| # PRs with 'skip-changelog' label will be excluded from release notes | ||
| changelog: | ||
| exclude: | ||
| labels: |
There was a problem hiding this comment.
[Suggestion] skip-changelog 标签在仓库中目前无自动应用机制。没有任何 workflow、labeler 配置或脚本会自动为 PR 添加此标签。pr-triage.sh 仅从关联 issue 同步标签,不会主动添加 skip-changelog。
建议:
- 确认 GitHub 仓库上已创建
skip-changelog标签 - 在
CONTRIBUTING.md中记录手动添加流程,或考虑添加.github/labeler.yml自动为 chore/bot PR 打上此标签
— qwen-latest-series-invite-beta-v34 via Qwen Code /review
There was a problem hiding this comment.
label 用的时候 gh 命令会自动创建。晚点我会批量加。
自动打标签暂时不搞,这个 label 本来就是偶尔手动用一下的,感觉可以不用增加这个逻辑。
| changelog: | ||
| exclude: | ||
| labels: | ||
| - 'skip-changelog' |
There was a problem hiding this comment.
[Suggestion] pr-triage.sh 会静默移除 skip-changelog 标签
pr-triage.sh(由 gemini-scheduled-pr-triage.yml 每 15 分钟执行)会遍历 PR 上所有标签,移除不在关联 issue 上的标签(仅豁免 status/need-issue)。由于 skip-changelog 是 PR 层面的概念,关联 issue 上不太可能有同名标签,因此维护者手动添加后 15 分钟内就会被静默移除,导致 release notes 排除失效。
建议在 pr-triage.sh 第 81 行的豁免条件中加入 skip-changelog:
if [[ "${label}" != "status/need-issue" && "${label}" != "skip-changelog" ]]; then— qwen-latest-series-invite-beta-v34 via Qwen Code /review
| # Configuration for GitHub's automatic release notes generation | ||
| # PRs with 'skip-changelog' label will be excluded from release notes | ||
| changelog: | ||
| exclude: |
There was a problem hiding this comment.
[Suggestion] 自动化 release PR 缺少 skip-changelog 标签
三个 release workflow(release.yml、release-sdk.yml、release-sdk-python.yml)会自动创建并合并 chore(release): v0.X.Y 类型的 PR。这些 PR 完全自动化,无人手动添加 skip-changelog,且无关联 issue。结果是每次发版后 1-3 个 chore(release) 条目会出现在下一次 release notes 中——正是此配置想要过滤的噪声。
建议在 release workflow 的 gh pr create 命令中添加 --label "skip-changelog",或在此处增加 exclude.authors 过滤 CI bot 账号。
— qwen-latest-series-invite-beta-v34 via Qwen Code /review
Both surfaced by a real workflow_dispatch comment run on PR #4327: the Run Qwen Code Review step succeeded but Post review summary comment failed in ~1s with 'GraphQL: Resource not accessible by integration (addComment)', and the existing fallback step did not trigger because it only matched review-step failure. - pull-requests: 'read' -> 'write'. `gh pr comment` goes through the GraphQL addComment mutation, which is gated on pull-requests:write even though PR comments are issue-comments at the REST layer. The fix is required for the entire "comment" path of this workflow to function, not just the new dispatch path. - Post fallback comment on review failure: also fires when steps.post-summary.conclusion == 'failure'. Without it a broken `gh pr comment` (permission gap, rate limit, transient network) looks identical to 'no review happened' from the PR side, with no pointer back to the failing workflow run.
Qwen Code ReviewReview of PR #4327 —
|
wenshao
left a comment
There was a problem hiding this comment.
No issues found. LGTM! ✅ — qwen-latest-series-invite-beta-v34 via Qwen Code /review
Caught by CI dry-run T-A on PR #4327 (workflow run 26168922068): ReferenceError: require is not defined in ES module scope at scripts/parse-review-stream.js:48 `const fs = require('fs');` This file is being treated as an ES module because it has a '.js' file extension and package.json contains "type": "module". The repo's root package.json has "type": "module", so every .js file in the tree is loaded as ESM. The accumulator parser uses CommonJS (require). Renaming the script to .cjs makes Node treat it as CommonJS, fixing the runtime error without rewriting the script. Changes: - scripts/parse-review-stream.js → scripts/parse-review-stream.cjs (git mv; no content changes besides updating the docstring filename and adding a one-paragraph comment explaining the .cjs choice). - .github/workflows/qwen-code-pr-review.yml: 3 invocation sites updated from .js to .cjs (LIGHT / STANDARD / DEEP tier execution steps + the prose comment under the DEEP step). - docs/design/code-review/preflight-triage.md: 4 stale references to scripts/parse-review-stream.js updated. This was caught only because we ran a real CI dry-run on PR #4327. actionlint locally was clean; local syntax check was clean; only the runtime context (the repo's ESM declaration in package.json) exposed the issue. Lesson: actionlint + JSON-shape testing of the prompt is necessary but not sufficient — pre-merge dry-run on real CI is what caught this.
…sing Caught by CI dry-run T-UL on PR #4327 (workflow run 26170406953): printf: - : invalid option printf: usage: printf [-v var] format [arguments] bash printf saw the format string starting with '- ' and tried to parse it as a flag. Adding '--' before the format explicitly terminates flag parsing, so the literal dash is treated as part of the format. Only ULTRA_LIGHT 'Compose ULTRA_LIGHT verdict' step was affected — it's the only step using markdown bullets with leading dashes inside the shell printf. Other tier paths build their summary via the qwen LLM output, not printf-with-dashes, so they don't hit this.
Summary
.github/release.yml配置文件,启用 GitHub 自动生成 release notes 的 label 过滤功能skip-changeloglabel,打上该 label 的 PR 不会出现在自动生成的 release notes 中背景
后续需要对部分 WIP PR 打
skip-changeloglabel,避免未完成功能的中间 commit 出现在 release notes 里。需要先有这个配置文件,label 过滤才会生效。参考文档:https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes
Test plan
skip-changeloglabel 的 PR 不出现在自动生成的 notes 中