code.gitea.io/gitea@v1.21.7/models/user/user_update.go (about) 1 // Copyright 2022 The Gitea Authors. All rights reserved. 2 // SPDX-License-Identifier: MIT 3 4 package user 5 6 import ( 7 "context" 8 9 "code.gitea.io/gitea/models/db" 10 ) 11 12 func IncrUserRepoNum(ctx context.Context, userID int64) error { 13 _, err := db.GetEngine(ctx).Incr("num_repos").ID(userID).Update(new(User)) 14 return err 15 }