e3e44a59d0
* update migrated issues/comments when login as github * add get userid when migrating or login with github oauth2 * fix lint * add migrations for repository service type * fix build * remove unnecessary dependencies on migrations * add cron task to update migrations poster ids and fix posterid when migrating * fix lint * fix lint * improve code * fix lint * improve code * replace releases publish id to actual author id * fix import * fix bug * fix lint * fix rawdata definition * fix some bugs * fix error message
27 lines
964 B
Go
27 lines
964 B
Go
// Copyright 2019 The Gitea Authors. All rights reserved.
|
|
// Copyright 2018 Jonas Franz. All rights reserved.
|
|
// Use of this source code is governed by a MIT-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package base
|
|
|
|
import "code.gitea.io/gitea/modules/structs"
|
|
|
|
// Downloader downloads the site repo informations
|
|
type Downloader interface {
|
|
GetRepoInfo() (*Repository, error)
|
|
GetTopics() ([]string, error)
|
|
GetMilestones() ([]*Milestone, error)
|
|
GetReleases() ([]*Release, error)
|
|
GetLabels() ([]*Label, error)
|
|
GetIssues(page, perPage int) ([]*Issue, bool, error)
|
|
GetComments(issueNumber int64) ([]*Comment, error)
|
|
GetPullRequests(page, perPage int) ([]*PullRequest, error)
|
|
}
|
|
|
|
// DownloaderFactory defines an interface to match a downloader implementation and create a downloader
|
|
type DownloaderFactory interface {
|
|
Match(opts MigrateOptions) (bool, error)
|
|
New(opts MigrateOptions) (Downloader, error)
|
|
GitServiceType() structs.GitServiceType
|
|
}
|