ai-worklog 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -507,10 +507,11 @@ def git_commit_and_push(log_file: Path, target_date: str, push: bool = True) ->
|
|
|
507
507
|
r = run(["git", "commit", "-m", commit_msg], check_err=False)
|
|
508
508
|
if r.returncode != 0:
|
|
509
509
|
if "nothing to commit" in r.stdout + r.stderr:
|
|
510
|
-
print("Git:
|
|
510
|
+
print("Git: 无变更,跳过提交(已在初始提交中)")
|
|
511
511
|
else:
|
|
512
512
|
print(f"Git commit 失败: {r.stderr.strip()}", file=sys.stderr)
|
|
513
|
-
|
|
513
|
+
return
|
|
514
|
+
# nothing to commit 不代表不需要 push,继续走推送流程
|
|
514
515
|
|
|
515
516
|
# ── 5. 推送 ────────────────────────────────────────────────────────────────
|
|
516
517
|
if push:
|
|
@@ -520,6 +521,8 @@ def git_commit_and_push(log_file: Path, target_date: str, push: bool = True) ->
|
|
|
520
521
|
r = run(["git", "push"])
|
|
521
522
|
if r.returncode == 0:
|
|
522
523
|
print("Git: 推送成功 ✓")
|
|
524
|
+
else:
|
|
525
|
+
print(f"Git push 失败: {r.stderr.strip()}", file=sys.stderr)
|
|
523
526
|
else:
|
|
524
527
|
print("Git: 已跳过 push(--no-push 模式)")
|
|
525
528
|
|