forked from forgejo/forgejo
Fix migration from gitbucket (repost) (#22477)
Reposting pull request for #22465 > Migration from GitBucket does not work due to a access for "Reviews" API on GitBucket that makes 404 response. This PR has following changes. > 1. Made to stop access for Reviews API while migrating from GitBucket. > 2. Added support for custom URL (e.g. `http://example.com/gitbucket/owner/repository`) > 3. Made to accept for git checkout URL (`http://example.com/git/owner/repository.git`) Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
parent
3510d7e33a
commit
9edf80f472
2 changed files with 12 additions and 3 deletions
|
@ -76,6 +76,7 @@ type GithubDownloaderV3 struct {
|
|||
curClientIdx int
|
||||
maxPerPage int
|
||||
SkipReactions bool
|
||||
SkipReviews bool
|
||||
}
|
||||
|
||||
// NewGithubDownloaderV3 creates a github Downloader via github v3 API
|
||||
|
@ -809,6 +810,9 @@ func (g *GithubDownloaderV3) convertGithubReviewComments(cs []*github.PullReques
|
|||
// GetReviews returns pull requests review
|
||||
func (g *GithubDownloaderV3) GetReviews(reviewable base.Reviewable) ([]*base.Review, error) {
|
||||
allReviews := make([]*base.Review, 0, g.maxPerPage)
|
||||
if g.SkipReviews {
|
||||
return allReviews, nil
|
||||
}
|
||||
opt := &github.ListOptions{
|
||||
PerPage: g.maxPerPage,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue