summaryrefslogtreecommitdiffstats
path: root/modules/migrations/github.go
diff options
context:
space:
mode:
authorAntoine GIRARD <sapk@users.noreply.github.com>2019-08-14 08:16:12 +0200
committerLunny Xiao <xiaolunwen@gmail.com>2019-08-14 14:16:12 +0800
commit46d6b92ad04df87560ee12dfee58a5e8222e52ff (patch)
tree55d7a5ebf3292b79af4eca564f4bdc3f353f58e8 /modules/migrations/github.go
parent99a004c343ff0770af4e209ca4634b83f153a23c (diff)
downloadgitea-46d6b92ad04df87560ee12dfee58a5e8222e52ff.tar.gz
gitea-46d6b92ad04df87560ee12dfee58a5e8222e52ff.zip
Import topics during migration (#7851)
* add GetTopics interface * CreateTopics * remove un-needed comment
Diffstat (limited to 'modules/migrations/github.go')
-rw-r--r--modules/migrations/github.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/migrations/github.go b/modules/migrations/github.go
index 93ba108548..c5f29cabb7 100644
--- a/modules/migrations/github.go
+++ b/modules/migrations/github.go
@@ -118,6 +118,12 @@ func (g *GithubDownloaderV3) GetRepoInfo() (*base.Repository, error) {
}, nil
}
+// GetTopics return github topics
+func (g *GithubDownloaderV3) GetTopics() ([]string, error) {
+ r, _, err := g.client.Repositories.Get(g.ctx, g.repoOwner, g.repoName)
+ return r.Topics, err
+}
+
// GetMilestones returns milestones
func (g *GithubDownloaderV3) GetMilestones() ([]*base.Milestone, error) {
var perPage = 100