gitlab-org--gitlab-foss/spec
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
..
bin DRY up the specs for bin/changelog 2016-11-03 17:35:06 +00:00
config Make mail_room idle_timeout option configurable. 2016-11-16 12:46:37 +01:00
controllers Merge branch '22348-gitea-importer' into 'master' 2016-12-20 11:11:24 +00:00
db/production Allow users to seed the initial runner registration token using an environment variable 2016-12-01 17:21:21 -08:00
factories Add terminal UI and controller actions 2016-12-19 21:27:08 +00:00
features Merge branch '22864-kubernetes-deploy-with-terminal' into 'master' 2016-12-20 10:34:29 +00:00
finders Merge branch 'jej-24637-move-issue-visible_to_user-to-finder' into 'security' 2016-12-15 11:41:04 -03:00
fixtures adds impersonator variable and makes sudo usage overall more clear 2016-12-07 14:42:51 +00:00
helpers Reduce duplication for GitHubish import status view 2016-12-19 17:35:51 +01:00
initializers
javascripts Make CI badge hitboxes better match container 2016-12-19 10:13:25 -08:00
lib Merge branch '22348-gitea-importer' into 'master' 2016-12-20 11:11:24 +00:00
mailers Merge branch '24880-configurable-plaintext-emails' into 'master' 2016-11-29 12:05:23 +00:00
migrations Encode when migrating ProcessCommitWorker jobs 2016-12-13 16:52:49 +01:00
models Merge branch '22348-gitea-importer' into 'master' 2016-12-20 11:11:24 +00:00
policies Add missing group policy spec 2016-12-15 21:30:35 +02:00
requests Spaces around literal hash 2016-12-19 23:20:22 +08:00
routing Modify GithubImport to support Gitea 2016-12-19 17:35:51 +01:00
serializers fix transient timing failure adding timecop 2016-12-14 14:49:10 +01:00
services Merge branch '20492-access-token-scopes' into 'master' 2016-12-16 17:38:41 +00:00
support Merge branch '22348-gitea-importer' into 'master' 2016-12-20 11:11:24 +00:00
tasks/gitlab Add LDAP task to rename a provider 2016-12-16 09:57:05 -06:00
uploaders Add Gitlab::Middleware::Multipart 2016-12-15 12:26:36 +01:00
views Fix test 2016-12-12 13:16:52 -06:00
workers Add a ReactiveCaching concern for use in the KubernetesService 2016-12-19 19:53:03 +00:00
factories_spec.rb
rails_helper.rb
rake_helper.rb Move task helpers to a module 2016-11-30 12:20:21 +01:00
simplecov_env.rb
spec_helper.rb Pass commit data to ProcessCommitWorker 2016-12-01 13:36:06 +01:00
teaspoon_env.rb