1. Title: feat(root): add TODO.md for project roadmap and tasks

This commit is contained in:
sankalp committed 2025-12-24 23:44:23 +05:45
1 parent ba747c727c
commit 4d309c313d
3 files changed
+55 -1

No files matched your search

+24
View File
@@ -1,5 +1,6 @@
from typing import Annotated
import questionary
import typer
from devgen.modules.commit_generator import run_commit_engine
@@ -94,3 +95,26 @@ def validate() -> None:
typer.echo(f"- {f}")
else:
typer.secho("[i] No staged files.", fg=typer.colors.RED)
@app.command("undo")
def undo_commit() -> None:
"""Undoes the last commit but keeps changes staged."""
from devgen.utils import run_git_command
try:
# Check if there's at least one commit
run_git_command(["git", "rev-parse", "HEAD"])
except Exception:
typer.secho("No commits found to undo.", fg=typer.colors.RED)
return
if questionary.confirm(
"Are you sure you want to undo the last commit? (Changes will remain staged)",
default=False,
).ask():
try:
run_git_command(["git", "reset", "--soft", "HEAD~1"])
typer.secho("Last commit undone. Changes are still staged.", fg=typer.colors.GREEN)
except Exception as e:
typer.secho(f"Failed to undo commit: {e}", fg=typer.colors.RED)
+1 -1
View File
@@ -15,7 +15,7 @@ from devgen.cli.setup import app as setup_app
app = typer.Typer(
name="devgen",
help="devgen-py: AI-Powered Git Commit & Release Automation.",
add_completion=False,
add_completion=True,
no_args_is_help=True,
rich_markup_mode="markdown",
)