]> source.dussan.org Git - gitea.git/commitdiff
bug fixed
authorLunny Xiao <xiaolunwen@gmail.com>
Sun, 23 Mar 2014 09:40:50 +0000 (17:40 +0800)
committerLunny Xiao <xiaolunwen@gmail.com>
Sun, 23 Mar 2014 09:40:50 +0000 (17:40 +0800)
models/action.go
serve.go

index cfb124363cd933994353a3cad5ba3c8d4d5ebead..4f78deb30e64f7d5e3a2d819846455e77a1fc6f4 100644 (file)
@@ -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
        }
index 2f7a9d605295c4b72023837a87ef747c77a208c9..bb9165dc06af1e129081ac715d836f80837caf0c 100644 (file)
--- 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)