successComment deprecation warning is logged for releases with no commits, even when successComment is not set
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript
- 领域
- release
调研方向
从 lib/success.js 中的 success() 入口点开始,检查将 successComment === false 与空的 commits 列表结合起来的分支。使用 commits: [] 且不提供 successComment 选项来复现该行为,然后添加一个回归测试,表明只有显式设置为 false 的 successComment 才会记录弃用警告,而空的 commits 仍会记录其正常消息。
由索引模型根据 Issue 内容生成。
描述
On 12.0.9 (same code on master), lib/success.js logs the "'false' for 'successComment' is deprecated" warning for any release with an empty commits list, even when successComment was never set.
if (successComment === false || isEmpty(commits)) {
if (isEmpty(commits)) {
logger.log("No commits found in release");
}
logger.log("Skip commenting on issues and pull requests.");
logger.warn(
`DEPRECATION: 'false' for 'successComment' is deprecated and will be removed in a future major version. Use 'successCommentCondition' instead.`,
);
}
Both halves of the condition end up in the same branch, so the logger.warn runs for the empty-commits case too. We hit it through a monorepo release tool that creates releases for packages whose path-filtered commit list is empty (dependency-only releases). Nothing in our config sets successComment or successCommentCondition, and the warning shows up once per such release.
Following the advice in the message doesn't help either: the first branch is taken before successCommentCondition is read, so setting it to false or a condition changes nothing about the warning.
To reproduce, call success() with commits: [] and no successComment option. You get the "No commits found in release" log line followed by the deprecation warning.
I think the warning should only be logged when successComment === false. Happy to send a PR for that with a test if that's welcome.
- 主要语言
- JavaScript
- 星标
- 535
- 派生
- 150
- 平均合并
- 1 分钟
- 30 天内合并 PR
- 3
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
semantic-release/github 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 38/100
semantic-release/github#1242 · 1 条评论 · 4 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 45/100
semantic-release/github#1103 · 1 条评论 · 1 个 reaction ·
-
bug
难度 3/5 1-2 天 新手友好度 68/100
semantic-release/github#1092 · 6 条评论 ·
-
难度 4/5 3-5 天 新手友好度 42/100
semantic-release/github#1082 · 5 条评论 · 2 个 reaction ·
-
bug Good first issue help wanted
难度 3/5 1-2 天 新手友好度 55/100
semantic-release/github#1065 · 5 条评论 · 1 个 reaction ·
查看 semantic-release/github 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
mksglu/context-mode#1200 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
neondatabase/website#5944 ·
-
module: core
难度 2/5 1-3 小时 新手友好度 75/100
bigbluebutton/bigbluebutton#25849 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
jaegertracing/jaeger-ui#4506 ·