Browse Source

bug fixed

for-closed-social
Lunny Xiao 10 years ago
parent
commit
0119675480
2 changed files with 4 additions and 2 deletions
  1. +3
    -1
      models/action.go
  2. +1
    -1
      serve.go

+ 3
- 1
models/action.go View File

@ -30,6 +30,7 @@ type Action struct {
ActUserName string // Action user name. ActUserName string // Action user name.
RepoId int64 RepoId int64
RepoName string RepoName string
RefName string
Content string `xorm:"TEXT"` Content string `xorm:"TEXT"`
Created time.Time `xorm:"created"` Created time.Time `xorm:"created"`
} }
@ -52,7 +53,7 @@ func (a Action) GetContent() string {
// CommitRepoAction records action for commit repository. // CommitRepoAction records action for commit repository.
func CommitRepoAction(userId int64, userName string, 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) bs, err := json.Marshal(commits)
if err != nil { if err != nil {
return err return err
@ -78,6 +79,7 @@ func CommitRepoAction(userId int64, userName string,
Content: string(bs), Content: string(bs),
RepoId: repoId, RepoId: repoId,
RepoName: repoName, RepoName: repoName,
RefName: refName,
}) })
return err return err
} }

+ 1
- 1
serve.go View File

@ -268,7 +268,7 @@ func runServ(k *cli.Context) {
} }
if err = models.CommitRepoAction(user.Id, user.Name, 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) log.Error("runUpdate.models.CommitRepoAction: %v", err, commits)
} else { } else {
//log.Info("refname", refname) //log.Info("refname", refname)

Loading…
Cancel
Save