gitlab-org--gitlab-foss/app/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 Implement minor changes from @dbalexandre's review. 2016-12-16 16:29:31 +05:30
ci
concerns Avoid use of Hash#dig to keep compatibility with Ruby 2.1 2016-12-16 19:59:53 -02:00
dashboard Limit what label fields we expose on Dashboard::LabelsController#index 2016-10-19 14:58:26 -02:00
explore
groups Sort group/project members alphabetically by default 2016-12-16 20:28:38 -02:00
import Namespace access token session key in Import::GithubController 2016-12-19 17:35:51 +01:00
oauth Implement minor changes from @dbalexandre's review. 2016-12-16 16:29:31 +05:30
profiles Merge branch '20492-access-token-scopes' into 'master' 2016-12-16 17:38:41 +00:00
projects Add terminal UI and controller actions 2016-12-19 21:27:08 +00:00
sherlock
abuse_reports_controller.rb
application_controller.rb Rename Gogs to Gitea, DRY the controller and improve views 2016-12-19 17:35:51 +01:00
autocomplete_controller.rb Do not raise error in AutocompleteController#users when not authorized 2016-11-30 10:09:14 +05:00
confirmations_controller.rb
dashboard_controller.rb
emojis_controller.rb
groups_controller.rb
health_check_controller.rb
help_controller.rb Fix URL rewritting in the Help section 2016-12-01 16:40:48 +01:00
invites_controller.rb
jwt_controller.rb Enable Style/MultilineOperationIndentation in Rubocop, fixes #25741 2016-12-16 21:37:22 +03:00
koding_controller.rb
notification_settings_controller.rb
omniauth_callbacks_controller.rb
passwords_controller.rb
profiles_controller.rb implements reset incoming email token on issues modal and account page, 2016-11-07 15:56:18 +00:00
projects_controller.rb Changed autocomplete_sources into an action that returns a single 'at' type of sources at a time 2016-12-15 15:20:33 +00:00
registrations_controller.rb Merge branch 'destroy-session' into 'security' 2016-12-08 21:21:06 -03:00
root_controller.rb
search_controller.rb Fix broken commits search 2016-11-08 12:03:23 +02:00
sent_notifications_controller.rb Remove default value for project argument on subscribable concern 2016-11-17 15:10:13 -02:00
sessions_controller.rb Enable Style/MultilineOperationIndentation in Rubocop, fixes #25741 2016-12-16 21:37:22 +03:00
snippets_controller.rb
uploads_controller.rb
users_controller.rb Check all namespaces on validation of new username. 2016-11-17 19:59:03 +01:00