diff options
author | Unknown <joe2010xtmf@163.com> | 2014-05-01 20:26:40 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-05-01 20:26:40 -0400 |
commit | ff9872104e8d2323420e084870da0625167b5e55 (patch) | |
tree | d9e4b80280a238e2129703340bd11803cff92ddf /models/action.go | |
parent | 100cd181bcc9fc46981cc2a4b88c05ad459fbc8f (diff) | |
download | gitea-ff9872104e8d2323420e084870da0625167b5e55.tar.gz gitea-ff9872104e8d2323420e084870da0625167b5e55.zip |
Fix #153
Diffstat (limited to 'models/action.go')
-rw-r--r-- | models/action.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/models/action.go b/models/action.go index 2fc8173443..61fd0a4428 100644 --- a/models/action.go +++ b/models/action.go @@ -40,7 +40,6 @@ type Action struct { RepoId int64 RepoName string RefName string - IsPrivate bool `xorm:"not null"` Content string `xorm:"TEXT"` Created time.Time `xorm:"created"` } @@ -102,8 +101,7 @@ func CommitRepoAction(userId int64, userName, actEmail string, } if err = NotifyWatchers(&Action{ActUserId: userId, ActUserName: userName, ActEmail: actEmail, - OpType: opType, Content: string(bs), RepoId: repoId, RepoName: repoName, RefName: refName, - IsPrivate: repo.IsPrivate}); err != nil { + OpType: opType, Content: string(bs), RepoId: repoId, RepoName: repoName, RefName: refName}); err != nil { log.Error("action.CommitRepoAction(notify watchers): %d/%s", userId, repoName) return err } @@ -115,7 +113,7 @@ func CommitRepoAction(userId int64, userName, actEmail string, // NewRepoAction adds new action for creating repository. func NewRepoAction(user *User, repo *Repository) (err error) { if err = NotifyWatchers(&Action{ActUserId: user.Id, ActUserName: user.Name, ActEmail: user.Email, - OpType: OP_CREATE_REPO, RepoId: repo.Id, RepoName: repo.Name, IsPrivate: repo.IsPrivate}); err != nil { + OpType: OP_CREATE_REPO, RepoId: repo.Id, RepoName: repo.Name}); err != nil { log.Error("action.NewRepoAction(notify watchers): %d/%s", user.Id, repo.Name) return err } @@ -127,8 +125,7 @@ func NewRepoAction(user *User, repo *Repository) (err error) { // TransferRepoAction adds new action for transfering repository. func TransferRepoAction(user, newUser *User, repo *Repository) (err error) { if err = NotifyWatchers(&Action{ActUserId: user.Id, ActUserName: user.Name, ActEmail: user.Email, - OpType: OP_TRANSFER_REPO, RepoId: repo.Id, RepoName: repo.Name, Content: newUser.Name, - IsPrivate: repo.IsPrivate}); err != nil { + OpType: OP_TRANSFER_REPO, RepoId: repo.Id, RepoName: repo.Name, Content: newUser.Name}); err != nil { log.Error("action.TransferRepoAction(notify watchers): %d/%s", user.Id, repo.Name) return err } |