aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-07 20:20:51 -0500
committerUnknwon <u@gogs.io>2015-11-07 20:20:51 -0500
commitd85a1d478ebba9b2f1f44431389507ae8d799dec (patch)
tree618a1104910633feb2fa1d99dc2082016f5847ef /models
parent676d774d8825ba5c87285989230ebb4b4a4dc522 (diff)
downloadgitea-d85a1d478ebba9b2f1f44431389507ae8d799dec.tar.gz
gitea-d85a1d478ebba9b2f1f44431389507ae8d799dec.zip
admin op with notice
Diffstat (limited to 'models')
-rw-r--r--models/repo.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/models/repo.go b/models/repo.go
index 22ad486fc8..c173b15ff6 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -1330,10 +1330,14 @@ func RewriteRepositoryUpdateHook() error {
return x.Where("id > 0").Iterate(new(Repository),
func(idx int, bean interface{}) error {
repo := bean.(*Repository)
- if err := repo.GetOwner(); err != nil {
- return err
+ repoPath, err := repo.RepoPath()
+ if err != nil {
+ if err2 := CreateRepositoryNotice(fmt.Sprintf("RewriteRepositoryUpdateHook[%d]: %v", repo.ID, err)); err2 != nil {
+ log.Error(4, "CreateRepositoryNotice: %v", err2)
+ }
+ return nil
}
- return createUpdateHook(RepoPath(repo.Owner.Name, repo.Name))
+ return createUpdateHook(repoPath)
})
}