gitlab-org--gitlab-foss/lib/gitlab/github_import
Douwe Maan 44cbfeaba8 Merge branch 'adam-fix-labels-find-or-create' into 'master'
Pass user instance to Labels::FindOrCreateService or skip_authorization: true

## What does this MR do?

It fixes a bug described in #23694 when `project.owner` was passed to `Labels::FindOrCreateService`. `Labels::FindOrCreateService` expected a user instance and `project.owner` may return a group as well. This MR makes sure that we either pass a user instance or `skip_authorization: true`.

## Are there points in the code the reviewer needs to double check?

- places where we pass `skip_authorization: true`

## Does this MR meet the acceptance criteria?

- Tests
  - [x] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

Fixes #23694

See merge request !7093
2016-10-28 15:01:59 +00:00
..
base_formatter.rb Use public_send instead of send 2016-10-28 11:30:20 +02:00
branch_formatter.rb Prefixes removed branches name with PR number when importing PR from GH 2016-08-08 20:24:40 -03:00
client.rb Fix typos 2016-10-28 11:30:20 +02:00
comment_formatter.rb Only add the original author if there isn't a linked GitLab account 2016-09-08 20:48:35 +10:00
importer.rb Fix typos 2016-10-28 11:30:20 +02:00
issue_formatter.rb Modify GitHub importer to be retryable 2016-10-28 11:30:20 +02:00
label_formatter.rb Merge branch 'adam-fix-labels-find-or-create' into 'master' 2016-10-28 15:01:59 +00:00
milestone_formatter.rb Modify GitHub importer to be retryable 2016-10-28 11:30:20 +02:00
project_creator.rb Skip wiki creation when GitHub project has wiki enabled 2016-10-04 13:06:45 -03:00
pull_request_formatter.rb Modify GitHub importer to be retryable 2016-10-28 11:30:20 +02:00
release_formatter.rb Modify GitHub importer to be retryable 2016-10-28 11:30:20 +02:00
wiki_formatter.rb more refactoring 2016-03-21 15:11:05 +01:00