diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2014-03-29 19:59:02 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2014-03-29 19:59:02 +0800 |
commit | ec1b801732b030648c060d26ce5a3ed8cf2e822c (patch) | |
tree | e6d884bcfa182022d0d69bbad7eae8852c2af03d /update.go | |
parent | 828282882066aa4e8bd8fb0c083c530607bc34bb (diff) |
bug fixed
Diffstat (limited to 'update.go')
-rw-r--r-- | update.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -132,8 +132,12 @@ func runUpdate(c *cli.Context) { commits := make([]*base.PushCommit, 0) var maxCommits = 3 + var actEmail string for e := l.Front(); e != nil; e = e.Next() { commit := e.Value.(*git.Commit) + if actEmail == "" { + actEmail = commit.Committer.Email + } commits = append(commits, &base.PushCommit{commit.Id().String(), commit.Message(), @@ -145,7 +149,7 @@ func runUpdate(c *cli.Context) { } //commits = append(commits, []string{lastCommit.Id().String(), lastCommit.Message()}) - if err = models.CommitRepoAction(int64(sUserId), userName, + if err = models.CommitRepoAction(int64(sUserId), userName, actEmail, repos.Id, repoName, git.BranchName(refName), &base.PushCommits{l.Len(), commits}); err != nil { log.Error("runUpdate.models.CommitRepoAction: %v", err) } |