aboutsummaryrefslogtreecommitdiffstats
path: root/services/repository/hooks.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/repository/hooks.go')
-rw-r--r--services/repository/hooks.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/services/repository/hooks.go b/services/repository/hooks.go
index d326cd26b1..d29384e012 100644
--- a/services/repository/hooks.go
+++ b/services/repository/hooks.go
@@ -25,10 +25,8 @@ func SyncRepositoryHooks(ctx context.Context) error {
if err := db.Iterate(
ctx,
- new(repo_model.Repository),
builder.Gt{"id": 0},
- func(idx int, bean interface{}) error {
- repo := bean.(*repo_model.Repository)
+ func(ctx context.Context, repo *repo_model.Repository) error {
select {
case <-ctx.Done():
return db.ErrCancelledf("before sync repository hooks for %s", repo.FullName())