diff options
Diffstat (limited to 'models/organization/team.go')
-rw-r--r-- | models/organization/team.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/models/organization/team.go b/models/organization/team.go index 6787b9e0fa..2d5ee17272 100644 --- a/models/organization/team.go +++ b/models/organization/team.go @@ -359,3 +359,9 @@ func GetRepoTeams(ctx context.Context, repo *repo_model.Repository) (teams []*Te OrderBy("CASE WHEN name LIKE '" + OwnerTeamName + "' THEN '' ELSE name END"). Find(&teams) } + +// IncrTeamRepoNum increases the number of repos for the given team by 1 +func IncrTeamRepoNum(ctx context.Context, teamID int64) error { + _, err := db.GetEngine(ctx).Incr("num_repos").ID(teamID).Update(new(Team)) + return err +} |