Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

successComment deprecation warning is logged for releases with no commits, even when successComment is not set

オープン 初心者向け
#1,297 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

semantic-release/github のほかの issue

semantic-release/github の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。