successComment deprecation warning is logged for releases with no commits, even when successComment is not set
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript
- 領域
- release
調査の方向性
lib/success.js の success() エントリーポイントから始め、successComment === false と空の commits リストを組み合わせる分岐を確認してください。commits: [] かつ successComment オプションなしで動作を再現し、その後、successComment が明示的に false の場合だけ非推奨警告がログに記録され、空の 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分
- マージ済み PR(30日)
- 3
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
semantic-release/github のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
semantic-release/github#1242 · コメント 1 件 · リアクション 4 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
semantic-release/github#1103 · コメント 1 件 · リアクション 1 件 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
semantic-release/github#1092 · コメント 6 件 ·
-
immutable releases オープン
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
semantic-release/github#1082 · コメント 5 件 · リアクション 2 件 ·
-
bug Good first issue help wanted
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
semantic-release/github#1065 · コメント 5 件 · リアクション 1 件 ·
semantic-release/github の issue をすべて見る
似ている issue
-
bug confirmed issue
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
open-webui/open-webui#30750 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Mend: dependency security vulnerability untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100