gitlab-org--gitlab-foss/spec/support
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
..
api Fix matcher match_response_schema 2016-08-17 12:58:59 -03:00
banzai Fix Markdown styling inside reference links 2016-11-01 09:49:30 +00:00
controllers Namespace access token session key in Import::GithubController 2016-12-19 17:35:51 +01:00
cycle_analytics_helpers Implement a second round of review comments from @DouweM. 2016-09-21 00:47:37 +05:30
features Remove default value for project argument on subscribable concern 2016-11-17 15:10:13 -02:00
gitlab_stubs Read job variables directly from gitlab CI config 2016-04-18 13:17:48 +02:00
import_export Merge branch 'fix/import-export-symlink-vulnerability' into 'security' 2016-11-03 16:04:18 +01:00
matchers Use :maximum instead of :within for length validators with a 0..N range 2016-12-06 10:23:17 +01:00
services Ensure issuable state changes only fire webhooks once 2016-12-16 10:52:59 +00:00
api_helpers.rb Enable Style/MultilineTernaryOperator rubocop cop 2016-07-20 14:24:39 +02:00
capybara.rb Pass --load-images=no to PhantomJS via Capybara/Poltergeist 2016-11-28 16:50:08 +08:00
capybara_helpers.rb Ensure only renderable text diffs are collapsed 2016-07-08 13:53:17 +01:00
carrierwave.rb Clear Carrierwave upload after each test example 2016-11-23 09:51:50 +01:00
chat_slash_commands_shared_examples.rb Improve after feedback 2016-12-19 15:40:06 +01:00
cycle_analytics_helpers.rb Merge branch 'issue_23548_dev' into 'master' 2016-11-09 12:25:17 +01:00
database_connection_helpers.rb Write a spec covering the race condition during group deletion. 2016-11-18 14:27:13 +05:30
db_cleaner.rb Precalculate user's authorized projects in database 2016-11-18 20:25:45 +02:00
email_format_shared_examples.rb Validate email addresses using Devise.email_regexp 2016-02-09 18:15:35 +01:00
email_helpers.rb Test against notification email 2016-10-21 18:22:09 +08:00
factory_girl.rb Add spec/support/factory_girl 2015-06-30 17:47:53 -04:00
fake_u2f_device.rb Add feature specs to cover naming and deleting U2F devices. 2016-08-18 22:12:02 +05:30
filter_spec_helper.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
fixture_helpers.rb Add fixture_file helper. 2015-08-20 12:41:47 -07:00
git_helpers.rb Generate branch/file names more randomly to avoid failures. 2016-09-07 11:26:07 +05:30
git_http_helpers.rb Added git http requests tests for user with LDAP identity 2016-09-28 08:43:21 +02:00
import_spec_helper.rb Namespace access token session key in Import::GithubController 2016-12-19 17:35:51 +01:00
issue_helpers.rb State specific default sort order for issuables 2016-08-01 11:28:56 +02:00
issue_tracker_service_shared_example.rb Prevent wrong markdown on issue ids when project has Jira service activated 2016-10-19 13:46:04 -02:00
javascript_fixtures_helpers.rb Strip <link> tags from fixtures to ignore CSS 2016-11-25 11:03:35 +01:00
jira_service_helper.rb Allow enabling and disabling commit and MR events for JIRA 2016-11-18 15:17:51 -02:00
kubernetes_helpers.rb Add terminals to the Kubernetes deployment service 2016-12-19 19:53:04 +00:00
ldap_helpers.rb Request only the LDAP attributes we need 2016-09-09 13:14:57 -05:00
login_helpers.rb fix: removed signed_out notification 2016-12-12 15:04:48 +05:30
markdown_feature.rb Hook up the updated WikiLinkFilter to the wiki controllers. 2016-06-09 10:15:01 +05:30
mentionable_shared_examples.rb Simplify Mentionable concern instance methods 2016-10-04 10:45:48 +02:00
merge_request_helpers.rb State specific default sort order for issuables 2016-08-01 11:28:56 +02:00
notify_shared_examples.rb Merge remote-tracking branch 'upstream/master' into pipeline-notifications 2016-10-25 23:03:47 +08:00
omni_auth.rb Added a lot of stubbing to make sure OAUth requests are handled properly with 2FA 2016-07-07 16:54:03 -05:00
project_features_apply_to_issuables_shared_examples.rb Merge branch '22481-honour-issue-visibility-for-groups' into 'security' 2016-11-09 12:24:13 +01:00
project_hook_data_shared_example.rb Added System Hooks for push and tag_push 2016-04-19 11:00:30 +02:00
rake_helpers.rb Move task helpers to a module 2016-11-30 12:20:21 +01:00
reactive_caching_helpers.rb Add a ReactiveCaching concern for use in the KubernetesService 2016-12-19 19:53:03 +00:00
reference_parser_helpers.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
reference_parser_shared_examples.rb Merge branch 'issue_23548_dev' into 'master' 2016-11-09 12:25:17 +01:00
repo_helpers.rb Add support to cherry-pick any commit 2016-04-18 15:39:07 +08:00
search_helpers.rb Fix broken commits search 2016-11-08 12:03:23 +02:00
select2_helper.rb Trigger change even in select2 test helper to produce production-like behaviour 2016-10-24 13:14:00 +03:00
services_shared_context.rb Grapify the service API 2016-12-09 17:20:12 +01:00
setup_builds_storage.rb Clear test build storage directory before each example 2016-11-23 13:51:05 +01:00
slack_mattermost_notifications_shared_examples.rb Use Slack::Notifier::LinkFormatter to convert markdown links to slack compat 2016-12-16 17:51:09 +01:00
slash_commands_helpers.rb Move write_note into SlashCommandsHelper and update other dependent specs 2016-09-08 18:52:55 -04:00
snippets_shared_examples.rb Fix snippets pagination 2016-09-26 12:42:12 +02:00
stub_configuration.rb Move task helpers to a module 2016-11-30 12:20:21 +01:00
stub_gitlab_calls.rb Rename all [ci_]commit to [ci_]pipeline in specs and features 2016-06-03 16:22:26 +02:00
stub_gitlab_data.rb Merge CI factories and CI spec/support with GitLab 2015-09-09 13:37:50 +02:00
taskable_shared_examples.rb add "x of y tasks completed" on issuable 2016-10-28 14:01:36 -02:00
test_env.rb Fix Error 500 when creating a merge request that contains an image that was deleted and added 2016-11-14 15:57:01 +01:00
updating_mentions_shared_examples.rb DRY up the added update service specs, add two email helpers 2016-08-16 17:08:43 +01:00
upload_helpers.rb Add Gitlab::Middleware::Multipart 2016-12-15 12:26:36 +01:00
wait_for_ajax.rb Wait for ajax for every merge request spinach test 2016-10-18 18:55:11 +03:00
wait_for_vue_resource.rb Fixed tests 2016-09-15 18:20:36 -04:00
webmock.rb Add spec/support files for WebMock and test coverage 2015-06-10 01:31:27 -04:00
workhorse_helpers.rb Verify JWT messages from gitlab-workhorse 2016-09-05 15:05:31 +02:00