diff options
author | John Kristensen <john@jerrykan.com> | 2019-06-11 10:27:26 +0300 |
---|---|---|
committer | John Kristensen <john@jerrykan.com> | 2019-06-12 03:52:54 +0300 |
commit | e47d9b3d0414176c77533d814656a6c691001ea9 (patch) | |
tree | bc5f25761bb33fe32b90c16095e919bb39429b6a /lib/gitlab/legacy_github_import | |
parent | c6152f3d28fd609600eeea10fbd38202b33af2d9 (diff) |
Don't import pull request comments from Gitea repos
The Gitea API does not provide the following API endpoint for pull request
comments:
/api/v1/repos/{owner}/{repo}/pulls/comments
When the importer attempts to request this endpoint it receives a '404
Not Found' error which causes the import to fail. By skipping any
attempts to import pull requests comments from Gitea we can ensure that
the import can complete successfully.
Diffstat (limited to 'lib/gitlab/legacy_github_import')
-rw-r--r-- | lib/gitlab/legacy_github_import/importer.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/gitlab/legacy_github_import/importer.rb b/lib/gitlab/legacy_github_import/importer.rb index 70b18221a66..751726d4810 100644 --- a/lib/gitlab/legacy_github_import/importer.rb +++ b/lib/gitlab/legacy_github_import/importer.rb @@ -55,7 +55,12 @@ module Gitlab import_pull_requests import_issues import_comments(:issues) - import_comments(:pull_requests) + + # Gitea doesn't have an API endpoint for pull requests comments + unless project.gitea_import? + import_comments(:pull_requests) + end + import_wiki # Gitea doesn't have a Release API yet |