Centralize Git identity environment construction

This commit is contained in:
Ian Gulliver
2026-10-21 11:12:54 -07:00
parent 9d0ffb5723
commit ae4cc5d57b
12 changed files with 23 additions and 69 deletions
+1 -6
View File
@@ -514,12 +514,7 @@ func (m *Manager) squashAndClose(ctx context.Context, taskID, login string) erro
return err
}
env := []string{
"GIT_AUTHOR_NAME=" + user.GitName,
"GIT_AUTHOR_EMAIL=" + user.GitEmail,
"GIT_COMMITTER_NAME=" + user.GitName,
"GIT_COMMITTER_EMAIL=" + user.GitEmail,
}
env := git.IdentityEnv(user.GitName, user.GitEmail)
commit, err := git.SquashCommit(project.RepoPath, task.WorktreePath, project.DefaultBranch, squashMessage(task.MergeTitle, coAuthors), env, m.signer(ctx, user))
if err != nil {
return err