feat(cli): 添加自动提交成功提示信息
This commit is contained in:
parent
7ab346c3db
commit
ede06cd102
|
|
@ -208,6 +208,18 @@ def _run():
|
||||||
console.print(f"[red]❌ 错误: 初始化 GitHandler 失败: {e}[/red]")
|
console.print(f"[red]❌ 错误: 初始化 GitHandler 失败: {e}[/red]")
|
||||||
raise typer.Exit(code=1)
|
raise typer.Exit(code=1)
|
||||||
|
|
||||||
|
console.print("[cyan]📤 正在检查暂存的文件...[/cyan]")
|
||||||
|
git_handler.auto_commit()
|
||||||
|
|
||||||
|
# 显示成功信息
|
||||||
|
console.print(Panel(
|
||||||
|
"[bold green]✅ 自动提交完成![/bold green]\n"
|
||||||
|
"[dim]已成功生成提交消息并提交暂存的更改[/dim]",
|
||||||
|
border_style="green",
|
||||||
|
padding=(1, 4)
|
||||||
|
))
|
||||||
|
|
||||||
|
""""
|
||||||
# 执行自动提交
|
# 执行自动提交
|
||||||
try:
|
try:
|
||||||
console.print("[cyan]📤 正在检查暂存的文件...[/cyan]")
|
console.print("[cyan]📤 正在检查暂存的文件...[/cyan]")
|
||||||
|
|
@ -225,7 +237,7 @@ def _run():
|
||||||
console.print(f"[red]❌ 自动提交失败: {e}[/red]")
|
console.print(f"[red]❌ 自动提交失败: {e}[/red]")
|
||||||
console.print("[yellow]💡 提示: 确保您有暂存的文件并且处于 Git 仓库中[/yellow]")
|
console.print("[yellow]💡 提示: 确保您有暂存的文件并且处于 Git 仓库中[/yellow]")
|
||||||
raise typer.Exit(code=1)
|
raise typer.Exit(code=1)
|
||||||
|
"""
|
||||||
|
|
||||||
@app.command(help="测试生成提交消息(不实际提交)")
|
@app.command(help="测试生成提交消息(不实际提交)")
|
||||||
def test_commit():
|
def test_commit():
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue