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

feat(init): built-in diff viewer and auto-commit with --yes

Aperta
#660 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
typescript
Ambito
cli

Direzione di ricerca

Inizia da formatResult() e buildSummaryLines() in src/lib/init/formatters.ts, quindi segui WizardOptions.yes e ApplyPatchsetPayload in src/lib/init/types.ts attraverso src/lib/init/wizard-runner.ts. Verifica come il wizard visualizza attualmente i riepiloghi e gestisce --yes. Il lavoro è completato quando i file sottoposti a patch mostrano diff unificati colorati, --yes esegue il commit successivamente e la modalità interattiva mantiene la richiesta di revisione.

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

Descrizione

enhancement

Summary

After the init wizard applies file changes, the CLI prints a static message — "Please review the changes above before committing." — but doesn't actually show the diffs. Users have to manually inspect the working tree to understand what changed. Additionally, when running with --yes (non-interactive mode), the wizard still stops without committing, requiring manual intervention.

This issue proposes two improvements:

  1. Built-in diff viewer — display inline diffs of all applied patches so users can review changes without leaving the terminal
  2. Auto-commit with --yes — when the user opts into non-interactive mode, automatically commit the wizard's changes after displaying the diff summary

Current Behavior

  • formatResult() in src/lib/init/formatters.ts builds a summary of changed files (create/modify/delete) via buildSummaryLines() and displays it with note()
  • A static log.info("Please review the changes above before committing.") message follows
  • The --yes flag auto-selects prompts and confirms but does not commit the resulting changes
  • Full patch data (including diffs) is available in ApplyPatchsetPayload but is not surfaced to the user

Proposed Behavior

  • After the wizard completes, render a colored unified diff of each patched file (using the patch data already available in ApplyPatchsetPayload)
  • When --yes is set, auto-commit the changes after displaying the diff summary (skip the "please review" message)
  • When --yes is not set, show the diff and keep the existing review prompt

References

  • src/lib/init/formatters.tsformatResult() and buildSummaryLines()
  • src/lib/init/types.tsWizardOptions.yes and ApplyPatchsetPayload
  • src/lib/init/wizard-runner.ts — wizard execution flow

Originated from a review comment by @BYK.

Lingua principale
TypeScript
Stelle
121
Fork
14
Merge medio
23h 54m
PR unite (30g)
103

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

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 getsentry/cli

Tutte le issue di getsentry/cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.