aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2014-03-23 17:40:50 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2014-03-23 17:40:50 +0800
commit0119675480505a6534ee0fc98c91e3bd2b8cdaaf (patch)
tree890d527db7f2047e6a8cb5858badb1d1ee6184b6
parentc4287bafabb96f3970bf629ff225c48112d008d9 (diff)
bug fixed
-rw-r--r--models/action.go4
-rw-r--r--serve.go2
2 files changed, 4 insertions, 2 deletions
diff --git a/models/action.go b/models/action.go
index cfb12436..4f78deb3 100644
--- a/models/action.go
+++ b/models/action.go
@@ -30,6 +30,7 @@ type Action struct {
ActUserName string // Action user name.
RepoId int64
RepoName string
+ RefName string
Content string `xorm:"TEXT"`
Created time.Time `xorm:"created"`
}
@@ -52,7 +53,7 @@ func (a Action) GetContent() string {
// CommitRepoAction records action for commit repository.
func CommitRepoAction(userId int64, userName string,
- repoId int64, repoName string, commits [][]string) error {
+ repoId int64, repoName string, refName string, commits [][]string) error {
bs, err := json.Marshal(commits)
if err != nil {
return err
@@ -78,6 +79,7 @@ func CommitRepoAction(userId int64, userName string,
Content: string(bs),
RepoId: repoId,
RepoName: repoName,
+ RefName: refName,
})
return err
}
diff --git a/serve.go b/serve.go
index 2f7a9d60..bb9165dc 100644
--- a/serve.go
+++ b/serve.go
@@ -268,7 +268,7 @@ func runServ(k *cli.Context) {
}
if err = models.CommitRepoAction(user.Id, user.Name,
- repo.Id, ref.BranchName(), commits); err != nil {
+ repo.Id, repoName, refname, commits); err != nil {
log.Error("runUpdate.models.CommitRepoAction: %v", err, commits)
} else {
//log.Info("refname", refname)