aboutsummaryrefslogtreecommitdiffstats
path: root/models/update.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-13 17:10:25 -0500
committerUnknwon <u@gogs.io>2015-11-13 17:10:25 -0500
commit1d57f0d64fcd9aec16b4003d5664f31ea748da03 (patch)
treea369a2581ffc57633c1813dee8ff29d2655fdeb0 /models/update.go
parent1559bd58e7dee6927d31e1aaf1b6ebfc0ffd59dc (diff)
downloadgitea-1d57f0d64fcd9aec16b4003d5664f31ea748da03.tar.gz
gitea-1d57f0d64fcd9aec16b4003d5664f31ea748da03.zip
Show custom avatars in commits
Diffstat (limited to 'models/update.go')
-rw-r--r--models/update.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/models/update.go b/models/update.go
index 7992313a80..14e56ce813 100644
--- a/models/update.go
+++ b/models/update.go
@@ -10,7 +10,6 @@ import (
"os/exec"
"strings"
- "github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/git"
"github.com/gogits/gogs/modules/log"
)
@@ -100,7 +99,7 @@ func Update(refName, oldCommitID, newCommitID, userName, repoUserName, repoName
actEmail = cmt.Committer.Email
}
- commit := &base.PushCommits{}
+ commit := &PushCommits{}
if err = CommitRepoAction(userID, user.Id, userName, actEmail,
repo.ID, repoUserName, repoName, refName, commit, oldCommitID, newCommitID); err != nil {
@@ -133,7 +132,7 @@ func Update(refName, oldCommitID, newCommitID, userName, repoUserName, repoName
}
// Push commits.
- commits := make([]*base.PushCommit, 0)
+ commits := make([]*PushCommit, 0)
var actEmail string
for e := l.Front(); e != nil; e = e.Next() {
commit := e.Value.(*git.Commit)
@@ -141,7 +140,7 @@ func Update(refName, oldCommitID, newCommitID, userName, repoUserName, repoName
actEmail = commit.Committer.Email
}
commits = append(commits,
- &base.PushCommit{commit.ID.String(),
+ &PushCommit{commit.ID.String(),
commit.Message(),
commit.Author.Email,
commit.Author.Name,
@@ -149,7 +148,7 @@ func Update(refName, oldCommitID, newCommitID, userName, repoUserName, repoName
}
if err = CommitRepoAction(userID, user.Id, userName, actEmail,
- repo.ID, repoUserName, repoName, refName, &base.PushCommits{l.Len(), commits, ""}, oldCommitID, newCommitID); err != nil {
+ repo.ID, repoUserName, repoName, refName, &PushCommits{l.Len(), commits, "", nil}, oldCommitID, newCommitID); err != nil {
return fmt.Errorf("runUpdate.models.CommitRepoAction: %s/%s:%v", repoUserName, repoName, err)
}
return nil