summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/convert/git_commit.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/convert/git_commit.go b/modules/convert/git_commit.go
index fd4f12ecfa..9f43bb82f8 100644
--- a/modules/convert/git_commit.go
+++ b/modules/convert/git_commit.go
@@ -147,8 +147,9 @@ func ToCommit(repo *models.Repository, commit *git.Commit, userCache map[string]
return &api.Commit{
CommitMeta: &api.CommitMeta{
- URL: repo.APIURL() + "/git/commits/" + commit.ID.String(),
- SHA: commit.ID.String(),
+ URL: repo.APIURL() + "/git/commits/" + commit.ID.String(),
+ SHA: commit.ID.String(),
+ Created: commit.Committer.When,
},
HTMLURL: repo.HTMLURL() + "/commit/" + commit.ID.String(),
RepoCommit: &api.RepoCommit{
@@ -169,8 +170,9 @@ func ToCommit(repo *models.Repository, commit *git.Commit, userCache map[string]
},
Message: commit.Message(),
Tree: &api.CommitMeta{
- URL: repo.APIURL() + "/git/trees/" + commit.ID.String(),
- SHA: commit.ID.String(),
+ URL: repo.APIURL() + "/git/trees/" + commit.ID.String(),
+ SHA: commit.ID.String(),
+ Created: commit.Committer.When,
},
},
Author: apiAuthor,