aboutsummaryrefslogtreecommitdiff
path: root/update.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2014-03-16 23:02:59 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2014-03-16 23:02:59 +0800
commit1fb457ac1f46ef07557f5c8c5b84438f2325a5cf (patch)
tree3c0c1004f71c1eb574044f82fc62d5406c4a043e /update.go
parentf824d6a4b11d4d8ddc82d54c5183934b465afbd3 (diff)
commit format improved
Diffstat (limited to 'update.go')
-rw-r--r--update.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/update.go b/update.go
index 477989e8..23d8fb02 100644
--- a/update.go
+++ b/update.go
@@ -47,6 +47,7 @@ func runUpdate(*cli.Context) {
if err != nil {
return
}
+
sUserId, err := strconv.Atoi(userId)
if err != nil {
log.Error("runUpdate.Parse userId: %v", err)
@@ -57,8 +58,10 @@ func runUpdate(*cli.Context) {
log.Error("runUpdate.Parse repoId: %v", err)
return
}
+ commits := make([][]string, 0)
+ commits = append(commits, []string{lastCommit.Id().String(), lastCommit.Message()})
if err = models.CommitRepoAction(int64(sUserId), userName,
- int64(sRepoId), repoName, lastCommit.Message()); err != nil {
+ int64(sRepoId), repoName, commits); err != nil {
log.Error("runUpdate.models.CommitRepoAction: %v", err)
}
}