diff options
author | Antoine GIRARD <sapk@users.noreply.github.com> | 2019-08-14 08:16:12 +0200 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2019-08-14 14:16:12 +0800 |
commit | 46d6b92ad04df87560ee12dfee58a5e8222e52ff (patch) | |
tree | 55d7a5ebf3292b79af4eca564f4bdc3f353f58e8 /modules/migrations/gitea.go | |
parent | 99a004c343ff0770af4e209ca4634b83f153a23c (diff) | |
download | gitea-46d6b92ad04df87560ee12dfee58a5e8222e52ff.tar.gz gitea-46d6b92ad04df87560ee12dfee58a5e8222e52ff.zip |
Import topics during migration (#7851)
* add GetTopics interface
* CreateTopics
* remove un-needed comment
Diffstat (limited to 'modules/migrations/gitea.go')
-rw-r--r-- | modules/migrations/gitea.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/migrations/gitea.go b/modules/migrations/gitea.go index 45f324516e..08244e5ab2 100644 --- a/modules/migrations/gitea.go +++ b/modules/migrations/gitea.go @@ -97,6 +97,11 @@ func (g *GiteaLocalUploader) CreateRepo(repo *base.Repository, opts base.Migrate return err } +// CreateTopics creates topics +func (g *GiteaLocalUploader) CreateTopics(topics ...string) error { + return models.SaveTopics(g.repo.ID, topics...) +} + // CreateMilestones creates milestones func (g *GiteaLocalUploader) CreateMilestones(milestones ...*base.Milestone) error { var mss = make([]*models.Milestone, 0, len(milestones)) |