mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Support choose email when creating a commit via web UI (#33432)
Initial PR for #24469
This commit is contained in:
@@ -11,7 +11,6 @@ import (
|
||||
"io"
|
||||
"path"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
packages_model "code.gitea.io/gitea/models/packages"
|
||||
repo_model "code.gitea.io/gitea/models/repo"
|
||||
@@ -296,8 +295,13 @@ func alterRepositoryContent(ctx context.Context, doer *user_model.User, repo *re
|
||||
return err
|
||||
}
|
||||
|
||||
now := time.Now()
|
||||
commitHash, err := t.CommitTreeWithDate(lastCommitID, doer, doer, treeHash, commitMessage, false, now, now)
|
||||
commitOpts := &files_service.CommitTreeUserOptions{
|
||||
ParentCommitID: lastCommitID,
|
||||
TreeHash: treeHash,
|
||||
CommitMessage: commitMessage,
|
||||
DoerUser: doer,
|
||||
}
|
||||
commitHash, err := t.CommitTree(commitOpts)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user