summaryrefslogtreecommitdiffstats
path: root/models/update.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-08-09 18:28:06 -0700
committerUnknwon <u@gogs.io>2016-08-09 18:28:06 -0700
commitc5d4a9e046045f949ec9606b49dc37b928e83fb3 (patch)
tree95269c1d60654c35d5c927cd34998d5add56ebf9 /models/update.go
parentedd786446c0f7a1581be08dbe7697c339790c2c1 (diff)
downloadgitea-c5d4a9e046045f949ec9606b49dc37b928e83fb3.tar.gz
gitea-c5d4a9e046045f949ec9606b49dc37b928e83fb3.zip
#2907 Add commit timestamp to webhook
Diffstat (limited to 'models/update.go')
-rw-r--r--models/update.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/models/update.go b/models/update.go
index 14e5b28cf2..9b2078c986 100644
--- a/models/update.go
+++ b/models/update.go
@@ -56,10 +56,12 @@ func ListToPushCommits(l *list.List) *PushCommits {
actEmail = commit.Committer.Email
}
commits = append(commits,
- &PushCommit{commit.ID.String(),
- commit.Message(),
- commit.Author.Email,
- commit.Author.Name,
+ &PushCommit{
+ Sha1: commit.ID.String(),
+ Message: commit.Message(),
+ AuthorEmail: commit.Author.Email,
+ AuthorName: commit.Author.Name,
+ Timestamp: commit.Author.When,
})
}
return &PushCommits{l.Len(), commits, "", nil}