Merge branch 'master' of github.com:gogits/gogs

This commit is contained in:
Unknown 2014-03-16 02:28:28 -04:00
commit 50df58a893
4 changed files with 78 additions and 0 deletions

View file

@ -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,