summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-16 02:28:28 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-16 02:28:28 -0400
commit50df58a893b745abff74bdcbb9be3fc0d10d21f4 (patch)
tree7753f6095090e3f0f60a15223fdf3074f0dfb11f /models
parent828c89de996c328bb3759d90be8a8a35b4d9cdc0 (diff)
parent795dad786189aeba9c61452e395bb4ecf5fc2cb9 (diff)
downloadgitea-50df58a893b745abff74bdcbb9be3fc0d10d21f4.tar.gz
gitea-50df58a893b745abff74bdcbb9be3fc0d10d21f4.zip
Merge branch 'master' of github.com:gogits/gogs
Diffstat (limited to 'models')
-rw-r--r--models/action.go15
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,