diff options
Diffstat (limited to 'models/action.go')
-rw-r--r-- | models/action.go | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/models/action.go b/models/action.go index d338da24..cfb12436 100644 --- a/models/action.go +++ b/models/action.go @@ -7,6 +7,8 @@ package models import ( "encoding/json" "time" + + "github.com/gogits/gogs/modules/log" ) // Operation types of user action. @@ -28,7 +30,7 @@ type Action struct { ActUserName string // Action user name. RepoId int64 RepoName string - Content string `xorm:"varchar(1000)"` + Content string `xorm:"TEXT"` Created time.Time `xorm:"created"` } @@ -79,6 +81,18 @@ func CommitRepoAction(userId int64, userName string, }) return err } + + // Update repository last update time. + repo, err := GetRepositoryByName(userId, repoName) + if err != nil { + return err + } + repo.IsBare = false + if err = UpdateRepository(repo); err != nil { + return err + } + + log.Trace("action.CommitRepoAction: %d/%s", userId, repo.LowerName) return nil } @@ -92,6 +106,8 @@ func NewRepoAction(user *User, repo *Repository) error { RepoId: repo.Id, RepoName: repo.Name, }) + + log.Trace("action.NewRepoAction: %s/%s", user.LowerName, repo.LowerName) return err } |