diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2014-03-16 12:18:34 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2014-03-16 12:18:34 +0800 |
commit | 3035a38caab5308ef30720760c99594fd9434176 (patch) | |
tree | 5582169bbb32538651e1a5c71546cd002f002888 /models/action.go | |
parent | f047df6e2b69ecb41c3fe4bef746145916aa4063 (diff) | |
download | gitea-3035a38caab5308ef30720760c99594fd9434176.tar.gz gitea-3035a38caab5308ef30720760c99594fd9434176.zip |
add update
Diffstat (limited to 'models/action.go')
-rw-r--r-- | models/action.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/models/action.go b/models/action.go index 6a77d73003..93c1e2768f 100644 --- a/models/action.go +++ b/models/action.go @@ -43,7 +43,22 @@ func (a Action) GetRepoName() string { return a.RepoName } +func CommitRepoAction(userId int64, userName string, + repoId int64, repoName string, msg string) error { + _, err := orm.InsertOne(&Action{ + UserId: userId, + ActUserId: userId, + ActUserName: userName, + OpType: OP_COMMIT_REPO, + Content: msg, + RepoId: repoId, + RepoName: repoName, + }) + return err +} + // NewRepoAction inserts action for create repository. + func NewRepoAction(user *User, repo *Repository) error { _, err := orm.InsertOne(&Action{ UserId: user.Id, |