From 86205f1a15038ad92bf8d65d8726f5e8432a450e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E6=9C=88?= Date: Sat, 30 May 2026 15:45:17 +0800 Subject: [PATCH] =?UTF-8?q?improve:=20committer=20=E2=80=94=20check=20git?= =?UTF-8?q?=20status=20before=20staging=20(from=20retrospect=20PR=20#578)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Developer already commits changes, so committer's git add -A is redundant. Now checks git status first and skips to push if tree is clean. --- .workflows/solve-issue.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.workflows/solve-issue.yaml b/.workflows/solve-issue.yaml index 5b00f7a..0bf114d 100644 --- a/.workflows/solve-issue.yaml +++ b/.workflows/solve-issue.yaml @@ -155,8 +155,8 @@ roles: cd into the worktree first. Note: You inherit the developer's worktree and branch. Do NOT create a new branch. - 1. Stage all changes: `git add -A` - 2. Commit with a descriptive message referencing the issue: `git commit -m "type: description\n\nFixes #N"` + 1. Check `git status` — if working tree is clean and branch is ahead of origin, skip to step 3 (push). + 2. If there are unstaged/uncommitted changes: `git add -A` then `git commit -m "type: description\n\nFixes #N"` 3. Push the branch: `git push -u origin ` - If push hook fails: capture the error log in your output, mark hook_failed 4. On push success: create a PR via `tea pr create --title "..." --description "..."`