fix(action): configure git user in worktree before commit
ci / test (push) Failing after 35s

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.
This commit is contained in:
Story Crater Bot
2026-08-22 00:57:57 -07:00
parent 7d4a3e2230
commit d74644d197
+5
View File
@@ -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", "[email protected]").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 {