gitlab-org--gitlab-foss/lib/gitlab
Rémy Coutable 367b68a01d Merge branch '22348-gitea-importer' into 'master'
It adds a brand new importer for Gitea!

This is a continuation of !6945 started by @bkc.

Gitea aims to be 100% GitHub-compatible but there's a few differences:

- Gitea is not an OAuth provider (yet): https://github.com/go-gitea/gitea/issues/27
  - This means we cannot map Gitea users given an assignee ID => assignees are not set on imported issues and merge requests
- No releases API for now: https://github.com/go-gitea/gitea/issues/330
- API version is `v1` (GitHub is `v3`)
- The IID field for milestones is `id` compared to `number` in GitHub.
- Issues, PRs, milestones, labels don't have a `url` field (the importer now fallback to `''` in that case)

**Known issues:**

- Comments are not imported because comments JSON always have a blank `html_url`/`issue_url`/`pull_request_url`, so the IID cannot be extracted and the issuable cannot be found... :( This is tracked in https://github.com/go-gitea/gitea/issues/401, and solved by https://github.com/gogits/gogs/pull/3624 but this needs to be submitted / merged in Gitea.

This is noted in the documentation.

## Are there points in the code the reviewer needs to double check?

1. I've made `Import::GiteaController` inherit from `Import::GithubController` since both controllers should be identical in the long-term and their current differences are small.
1. I've added a base `IssuableFormatter` class from which `IssueFormatter` & `PullRequestFormatter` inherit
1. I've added shared examples for GitHub/Gitea importer classes
1. I've made `Gitlab::ImportSources` more robust and tested! 🎄 
1. I've added routing specs for import routes! 🎄 

Closes #22348

See merge request !8116
2016-12-20 11:11:24 +00:00
..
auth
backend Refine Git garbage collection 2016-11-04 14:30:11 +01:00
badge Also use latest_status, feedback: 2016-12-15 18:12:33 +08:00
bitbucket_import Add Wiki import to BB importer 2016-12-19 20:48:08 +02:00
chat_commands Improve after feedback 2016-12-19 15:40:06 +01:00
checks Implement final review comments from @rymai. 2016-12-16 23:32:25 +05:30
ci Improve how we calculate detailed status group name 2016-12-16 20:03:44 +01:00
conflict
cycle_analytics Fix and relevant spec for plan stage breaking with nil commits 2016-11-23 09:10:04 +01:00
data_builder Added Ci::Stage specs 2016-12-06 16:04:30 +01:00
database fixing spec failures 2016-11-17 08:22:55 +01:00
diff Fixes ActionView::Template::Error: undefined method text? for nil:NilClass 2016-12-02 14:03:30 +02:00
downtime_check
email Enable Style/MultilineOperationIndentation in Rubocop, fixes #25741 2016-12-16 21:37:22 +03:00
fogbugz_import Pass user instance to Labels::FindOrCreateService or skip_authorization: true 2016-10-28 11:31:45 +02:00
gfm Add Gitlab::Middleware::Multipart 2016-12-15 12:26:36 +01:00
git Reject blank environment vcariables in Gitlab::Git::RevList 2016-12-20 09:45:37 +01:00
github_import Add Project#gitea_import? 2016-12-19 17:35:51 +01:00
gitlab_import
google_code_import Pass user instance to Labels::FindOrCreateService or skip_authorization: true 2016-10-28 11:31:45 +02:00
graphs
import_export Merge branch 'fix/import-export-mr-error' into 'master' 2016-12-19 18:03:06 +00:00
ldap Centralize LDAP config/filter logic 2016-11-11 15:58:33 -06:00
markdown
metrics
middleware Add Gitlab::Middleware::Multipart 2016-12-15 12:26:36 +01:00
o_auth Improve the Gitlab::OAuth::User error message 2016-11-30 11:23:04 -06:00
request_profiler
saml
sanitizers
serialize/ci Keep the value type for YAML variables 2016-12-19 21:15:47 +08:00
sherlock
sidekiq_middleware
slash_commands
sql Merge branch 'jej-note-search-uses-finder' into 'security' 2016-12-15 11:40:12 -03:00
template Allow to use Dockerfile templates 2016-11-08 13:54:58 +00:00
access.rb
allowable.rb Remove trailing blank line from Allowable module 2016-12-14 08:36:03 +01:00
app_logger.rb
asciidoc.rb Don't open Asciidoc module twice 2016-12-15 18:03:57 +00:00
auth.rb Rename the token_has_scope? method. 2016-12-16 16:29:32 +05:30
award_emoji.rb
blame.rb
changes_list.rb
chat_name_token.rb Add most of specs for chat names 2016-11-17 21:34:23 +01:00
closing_issue_extractor.rb
color_schemes.rb
config_helper.rb
contributions_calendar.rb Merge branch '23403-fix-events-for-private-project-features' into 'security' 2016-11-09 12:27:41 +01:00
contributor.rb
current_settings.rb Rename Gogs to Gitea, DRY the controller and improve views 2016-12-19 17:35:51 +01:00
database.rb Refresh project authorizations using a Redis lease 2016-11-25 13:35:01 +01:00
devise_failure.rb
downtime_check.rb
ee_compat_check.rb Ensure we sanitize branch names with path-unfriendly characters 2016-11-23 10:55:28 +01:00
emoji.rb
environment_logger.rb Show log corresponding to env in admin/logs 2016-11-03 22:02:47 +01:00
exclusive_lease.rb Refine Git garbage collection 2016-11-04 14:30:11 +01:00
file_detector.rb Unify detecting of special repository files 2016-11-21 12:51:40 +01:00
git.rb
git_access.rb Accept environment variables from the pre-receive script. 2016-12-16 23:32:25 +05:30
git_access_status.rb
git_access_wiki.rb Allow access to the wiki with git when repository feature disabled 2016-11-30 16:02:24 -02:00
git_logger.rb
git_post_receive.rb
git_ref_validator.rb
gl_id.rb
gon_helper.rb Render math in Asciidoc and Markdown with KaTeX using code blocks 2016-12-14 16:50:54 +00:00
highlight.rb
identifier.rb Use Commit#author so we share logic and cache 2016-11-24 02:33:55 +08:00
import_export.rb Fix import/export labels to cope with project and group labels. Added relevant specs. 2016-10-19 14:58:25 -02:00
import_formatter.rb
import_sources.rb Improve Gitlab::ImportSources 2016-12-19 17:35:51 +01:00
incoming_email.rb implements reset incoming email token on issues modal and account page, 2016-11-07 15:56:18 +00:00
issues_labels.rb Pass user instance to Labels::FindOrCreateService or skip_authorization: true 2016-10-28 11:31:45 +02:00
key_fingerprint.rb
kubernetes.rb Add terminals to the Kubernetes deployment service 2016-12-19 19:53:04 +00:00
lazy.rb
lfs_token.rb
logger.rb
mail_room.rb Make mail_room idle_timeout option configurable. 2016-11-16 12:46:37 +01:00
markup_helper.rb
metrics.rb
optimistic_locking.rb Make retry_lock to not be infinite 2016-10-27 12:34:35 +01:00
other_markup.rb
popen.rb Accept environment variables from the pre-receive script. 2016-12-16 23:32:25 +05:30
project_search_results.rb Merge branch 'jej-note-search-uses-finder' into 'security' 2016-12-15 11:40:12 -03:00
protocol_access.rb
recaptcha.rb
redis.rb Updated mail_room and added sentinel support to Reply by Email 2016-10-26 05:02:47 +02:00
reference_extractor.rb
regex.rb Add an environment slug 2016-12-15 13:57:03 +00:00
repository_check_logger.rb
request_profiler.rb
routing.rb Make it possible to mix Gitlab::Routing in 2016-12-13 14:51:23 +01:00
search_results.rb Merge branch 'jej-23867-use-mr-finder-instead-of-access-check' into 'security' 2016-12-08 21:42:07 -03:00
seeder.rb
sentry.rb
sherlock.rb
sidekiq_logger.rb
sidekiq_throttler.rb Refactored Sidekiq Throttler and updated documentation 2016-11-11 11:14:58 -06:00
snippet_search_results.rb
themes.rb
timeless.rb
upgrader.rb
uploads_transfer.rb
url_builder.rb API: Endpoint to expose personal snippets as /snippets 2016-12-01 19:07:49 +01:00
url_sanitizer.rb
user_access.rb
utils.rb Fix project features default values 2016-11-01 11:03:56 -02:00
version_info.rb
visibility_level.rb
workhorse.rb Add terminals to the Kubernetes deployment service 2016-12-19 19:53:04 +00:00