Skip to content

Commit

Permalink
Fix zero created time bug on commit api (go-gitea#17546)
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny authored and Stelios Malathouras committed Mar 28, 2022
1 parent 32f67bf commit 48869b2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions modules/convert/git_commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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,
Expand Down

0 comments on commit 48869b2

Please sign in to comment.