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
#1,386 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Start with formatResult() and buildSummaryLines() in src/lib/init/formatters.ts, then trace WizardOptions.yes and ApplyPatchsetPayload in src/lib/init/types.ts through src/lib/init/wizard-runner.ts. Confirm how the wizard exposes patch data and handles --yes. Done means applied diffs are shown, --yes commits after the summary, and interactive mode retains the review prompt.

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

Descrizione

CLI 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.ts — formatResult() and buildSummaryLines()
  • src/lib/init/types.ts — WizardOptions.yes and ApplyPatchsetPayload
  • src/lib/init/wizard-runner.ts — wizard execution flow

Originated from a review comment by @BYK.

Lingua principale
TypeScript
Stelle
938
Fork
166
Merge medio
1g 5h
PR unite (30g)
172

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

Tutte le issue di getsentry/toolkit

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.