Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

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

Ouverte
#1,386 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
55/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
typescript
Domaine
cli

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
TypeScript
Étoiles
938
Forks
166
Merge moyen
1 j 5 h
PR mergées (30 j)
171

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de getsentry/toolkit

Toutes les issues de getsentry/toolkit

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.