Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta Adatta ai principianti
#1,297 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript
Ambito
release

Direzione di ricerca

Inizia in lib/success.js dal punto di ingresso success() e ispeziona il ramo che combina successComment === false con un elenco di commits vuoto. Riproduci il comportamento con commits: [] e senza l’opzione successComment, quindi aggiungi un test di regressione che dimostri che solo un successComment impostato esplicitamente su false registra l’avviso di deprecazione, mentre i commits vuoti continuano a registrare i loro messaggi normali.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
JavaScript
Stelle
535
Fork
150
Merge medio
5g 16h
PR unite (30g)
11

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di semantic-release/github

Tutte le issue di semantic-release/github

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.