gitlab-org--gitlab-foss/spec/controllers
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
..
admin Allow admins to stop impersonating users without e-mail addresses 2016-11-17 23:28:39 -05:00
ci Redirect to root path when visiting /ci 2016-03-29 08:04:17 +02:00
groups Add toggle_subscription action to Groups::LabelsController 2016-11-17 15:10:13 -02:00
import Namespace access token session key in Import::GithubController 2016-12-19 17:35:51 +01:00
oauth Use HTTP matchers if possible 2016-06-27 20:10:42 +02:00
profiles Add a controller spec for personal access tokens. 2016-12-16 16:29:32 +05:30
projects Add terminal UI and controller actions 2016-12-19 21:27:08 +00:00
abuse_reports_controller_spec.rb Add AbuseReport#notify 2016-01-04 18:59:42 -05:00
application_controller_spec.rb Add nested groups support to the routing 2016-11-23 14:08:36 +02:00
autocomplete_controller_spec.rb Do not raise error in AutocompleteController#users when not authorized 2016-11-30 10:09:14 +05:00
blob_controller_spec.rb Fix Error 500 when viewing a blob with binary characters after the 1024-byte mark 2016-06-12 07:36:25 -07:00
groups_controller_spec.rb This fixes a long running tests due to changed Sidekiq state 2016-08-15 23:26:40 +02:00
health_check_controller_spec.rb Use HTTP matchers if possible 2016-06-27 20:10:42 +02:00
help_controller_spec.rb Fix URL rewritting in the Help section 2016-12-01 16:40:48 +01:00
invites_controller_spec.rb Use HTTP matchers if possible 2016-06-27 20:10:42 +02:00
notification_settings_controller_spec.rb Merge branch 'master' into issue_3359_3 2016-06-29 11:32:38 -03:00
projects_controller_spec.rb Merge branch 'use-separate-token-for-incoming-email' into 'master' 2016-11-08 10:47:45 +00:00
registrations_controller_spec.rb Assert against ActionMailer::Base.deliveries relatively. 2016-07-05 10:20:32 +05:30
root_controller_spec.rb Implementing 'Groups View' and 'TODOs View' as options for dashboard preferences. 2016-03-24 19:59:54 +01:00
search_controller_spec.rb Merge branch 'jej-note-search-uses-finder' into 'security' 2016-12-15 11:40:12 -03:00
sent_notifications_controller_spec.rb Remove default value for project argument on subscribable concern 2016-11-17 15:10:13 -02:00
sessions_controller_spec.rb fix: 24982- Remove'Signed in successfully' message 2016-12-07 20:30:28 +05:30
snippets_controller_spec.rb Ensure user is authenticated to create a new snippet 2016-11-28 16:57:49 +01:00
uploads_controller_spec.rb Use HTTP matchers if possible 2016-06-27 20:10:42 +02:00
users_controller_spec.rb Enforce the fork_project permission in Projects::CreateService 2016-09-27 13:17:56 +01:00