gitlab-org--gitlab-foss/spec/models
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
..
ci Add explicit status test, feedback: 2016-12-15 18:52:36 +08:00
concerns Add a ReactiveCaching concern for use in the KubernetesService 2016-12-19 19:53:03 +00:00
cycle_analytics Merge branch 'jej-fix-missing-access-check-on-issues' into 'security' 2016-11-28 21:25:46 -03:00
hooks
issue
members Optimize Event queries by removing default order 2016-10-27 20:07:11 -03:00
merge_request
network
project_services Merge branch '22864-kubernetes-deploy-with-terminal' into 'master' 2016-12-20 10:34:29 +00:00
ability_spec.rb
abuse_report_spec.rb
appearance_spec.rb
application_setting_spec.rb Refine Git garbage collection 2016-11-04 14:30:11 +01:00
award_emoji_spec.rb
blob_spec.rb
board_spec.rb
broadcast_message_spec.rb Use build instead create in BroadcastMessage model spec 2016-11-19 03:22:02 +05:00
build_spec.rb Spaces for literal hash 2016-12-19 22:22:57 +08:00
chat_name_spec.rb Add most of specs for chat names 2016-11-17 21:34:23 +01:00
commit_range_spec.rb Merge branch 'jej-23867-use-mr-finder-instead-of-access-check' into 'security' 2016-12-08 21:42:07 -03:00
commit_spec.rb Add explicit status test, feedback: 2016-12-15 18:52:36 +08:00
commit_status_spec.rb Add some missing tests for detailed status methods 2016-12-14 10:21:16 +01:00
compare_spec.rb
deploy_key_spec.rb
deploy_keys_project_spec.rb
deployment_spec.rb
diff_note_spec.rb
discussion_spec.rb Feature: delegate all open discussions to Issue 2016-12-05 20:55:45 +01:00
email_spec.rb refactor(email): use setter method instead AR callbacks 2016-10-23 17:30:07 +05:00
environment_spec.rb Add terminals to the Kubernetes deployment service 2016-12-19 19:53:04 +00:00
event_spec.rb Removed data-user-is view code 2016-11-25 13:45:34 +01:00
external_issue_spec.rb Add the method ExternalIssue#project_id 2016-11-07 12:49:24 +01:00
forked_project_link_spec.rb
generic_commit_status_spec.rb Add some missing tests for detailed status methods 2016-12-14 10:21:16 +01:00
global_milestone_spec.rb
group_label_spec.rb Add shorthand support to gitlab markdown references 2016-12-02 19:18:17 -02:00
group_spec.rb Merge branch 'use-build-instead-create' into 'master' 2016-12-15 16:46:10 +00:00
guest_spec.rb Merge branch 'fix-unathorized-cloning' into 'security' 2016-11-09 12:27:17 +01:00
identity_spec.rb
issue_collection_spec.rb Process commits in a separate worker 2016-11-07 13:11:44 +01:00
issue_spec.rb Merge branch 'jej-24637-move-issue-visible_to_user-to-finder' into 'security' 2016-12-15 11:41:04 -03:00
key_spec.rb Use :maximum instead of :within for length validators with a 0..N range 2016-12-06 10:23:17 +01:00
label_link_spec.rb
label_priority_spec.rb
label_spec.rb
legacy_diff_note_spec.rb
list_spec.rb
member_spec.rb Precalculate user's authorized projects in database 2016-11-18 20:25:45 +02:00
merge_request_diff_spec.rb Replace references to MergeRequestDiff#commits with st_commits 2016-12-01 12:17:30 +01:00
merge_request_spec.rb Change closes issues reference text on MergeRequest#merge_commit_message to match existing text generated by the system 2016-12-16 19:15:07 +10:00
milestone_spec.rb Merge branch 'jej-24637-move-issue-visible_to_user-to-finder' into 'security' 2016-12-15 11:41:04 -03:00
namespace_spec.rb Merge branch 'dz-nested-groups-title-ui' into 'master' 2016-12-16 09:41:23 +00:00
note_spec.rb Merge branch 'jej-note-search-uses-finder' into 'security' 2016-12-15 11:40:12 -03:00
notification_setting_spec.rb
personal_access_token_spec.rb
project_feature_spec.rb
project_group_link_spec.rb Precalculate user's authorized projects in database 2016-11-18 20:25:45 +02:00
project_label_spec.rb Add shorthand support to gitlab markdown references 2016-12-02 19:18:17 -02:00
project_snippet_spec.rb
project_spec.rb Merge branch '22348-gitea-importer' into 'master' 2016-12-20 11:11:24 +00:00
project_team_spec.rb Update ProjectTeam#fetch_members to use project authorizations 2016-11-23 12:59:13 +02:00
project_wiki_spec.rb
protected_branch_spec.rb
release_spec.rb
repository_spec.rb Update outdated visible content spec descriptions 2016-12-07 11:31:01 +01:00
route_spec.rb Fix Route#rename_children behavior 2016-12-19 22:36:47 +02:00
service_spec.rb Remove empty describe block in service spec 2016-11-22 21:27:16 +05:00
snippet_spec.rb Merge branch '25209-improve-length-validators' into 'master' 2016-12-07 10:31:21 +00:00
spam_log_spec.rb
subscription_spec.rb Allow subscriptions to be created without a project 2016-11-17 15:10:13 -02:00
todo_spec.rb
tree_spec.rb
trending_project_spec.rb
user_agent_detail_spec.rb
user_spec.rb Be smarter when finding a sudoed user in API::Helpers 2016-12-13 15:53:00 +01:00
wiki_page_spec.rb