From d74644d1979c6bff563edae15e62e3e5eb1b35a5 Mon Sep 17 00:00:00 2001 From: Story Crater Bot <19826264+Riotpiaole@users.noreply.github.com> Date: Sat, 22 Aug 2026 00:57:57 -0700 Subject: [PATCH] fix(action): configure git user in worktree before commit Worktrees don't inherit git config from main repo, causing 'git commit' to fail with exit status 128 when user.name/user.email are not set. Configure with poimen agent identity before each commit. --- action/git.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/action/git.go b/action/git.go index 8c657c8..193ce4b 100644 --- a/action/git.go +++ b/action/git.go @@ -78,6 +78,11 @@ type GitCommitInput struct { // GitCommitActivity commits changes in a worktree. func GitCommitActivity(ctx context.Context, in GitCommitInput) error { + // Configure git user for commits if not already configured + // (worktrees don't inherit config from main repo) + exec.CommandContext(ctx, "git", "-C", in.WorktreePath, "config", "user.email", "poimen@riotpiao.com").Run() + exec.CommandContext(ctx, "git", "-C", in.WorktreePath, "config", "user.name", "Poimen Agent").Run() + // Stage all changes cmd := exec.CommandContext(ctx, "git", "-C", in.WorktreePath, "add", "-A") if err := cmd.Run(); err != nil {