summaryrefslogtreecommitdiffstats
path: root/modules/convert/git_commit.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2021-03-27 17:45:26 +0100
committerGitHub <noreply@github.com>2021-03-27 17:45:26 +0100
commit290cf75f9343a43d9770b1d6f8f3332a23357e27 (patch)
tree520f9f8616fbff3b43a1808ef2d73af3f2fe534b /modules/convert/git_commit.go
parentf4d27498bdc615605e14f783501e1d1256cd8d22 (diff)
downloadgitea-290cf75f9343a43d9770b1d6f8f3332a23357e27.tar.gz
gitea-290cf75f9343a43d9770b1d6f8f3332a23357e27.zip
[refactor] Unify the export of user data via API (#15144)
* [refactor] unify how user data is exported via API * test time via unix timestamp
Diffstat (limited to 'modules/convert/git_commit.go')
-rw-r--r--modules/convert/git_commit.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/convert/git_commit.go b/modules/convert/git_commit.go
index 4e30ec2c0b..c647dd4e18 100644
--- a/modules/convert/git_commit.go
+++ b/modules/convert/git_commit.go
@@ -86,13 +86,13 @@ func ToCommit(repo *models.Repository, commit *git.Commit, userCache map[string]
}
if ok {
- apiAuthor = ToUser(cacheAuthor, false, false)
+ apiAuthor = ToUser(cacheAuthor, nil)
} else {
author, err := models.GetUserByEmail(commit.Author.Email)
if err != nil && !models.IsErrUserNotExist(err) {
return nil, err
} else if err == nil {
- apiAuthor = ToUser(author, false, false)
+ apiAuthor = ToUser(author, nil)
if userCache != nil {
userCache[commit.Author.Email] = author
}
@@ -108,13 +108,13 @@ func ToCommit(repo *models.Repository, commit *git.Commit, userCache map[string]
}
if ok {
- apiCommitter = ToUser(cacheCommitter, false, false)
+ apiCommitter = ToUser(cacheCommitter, nil)
} else {
committer, err := models.GetUserByEmail(commit.Committer.Email)
if err != nil && !models.IsErrUserNotExist(err) {
return nil, err
} else if err == nil {
- apiCommitter = ToUser(committer, false, false)
+ apiCommitter = ToUser(committer, nil)
if userCache != nil {
userCache[commit.Committer.Email] = committer
}