Commit 182060b4 authored by Valery Sizov's avatar Valery Sizov

Resolve conflicts in CE->EE MR

parent 206d451e
......@@ -3,7 +3,6 @@ class IssueAssignee < ActiveRecord::Base
belongs_to :issue
belongs_to :assignee, class_name: "User", foreign_key: :user_id
<<<<<<< HEAD
# EE-specific
after_create :update_elasticsearch_index
......@@ -20,6 +19,4 @@ class IssueAssignee < ActiveRecord::Base
)
end
end
=======
>>>>>>> upstream/master
end
......@@ -961,12 +961,6 @@ class User < ActiveRecord::Base
end
def invalidate_cache_counts
<<<<<<< HEAD
Rails.cache.delete(['users', id, 'assigned_open_merge_requests_count'])
Rails.cache.delete(['users', id, 'assigned_open_issues_count'])
end
=======
invalidate_issue_cache_counts
invalidate_merge_request_cache_counts
end
......@@ -979,7 +973,6 @@ class User < ActiveRecord::Base
Rails.cache.delete(['users', id, 'assigned_open_merge_requests_count'])
end
>>>>>>> upstream/master
def todos_done_count(force: false)
Rails.cache.fetch(['users', id, 'todos_done_count'], force: force) do
TodosFinder.new(self, state: :done).execute.count
......
......@@ -179,10 +179,7 @@ class IssuableBaseService < BaseService
issuable.create_cross_references!(current_user)
execute_hooks(issuable)
issuable.assignees.each(&:invalidate_cache_counts)
<<<<<<< HEAD
=======
invalidate_cache_counts(issuable.assignees, issuable)
>>>>>>> upstream/master
end
issuable
......@@ -240,14 +237,11 @@ class IssuableBaseService < BaseService
)
if old_assignees != issuable.assignees
<<<<<<< HEAD
## EE-specific
new_assignees = issuable.assignees.to_a
affected_assignees = (old_assignees + new_assignees) - (old_assignees & new_assignees)
affected_assignees.compact.each(&:invalidate_cache_counts)
=======
assignees = old_assignees + issuable.assignees.to_a
invalidate_cache_counts(assignees.compact, issuable)
>>>>>>> upstream/master
invalidate_cache_counts(affected_assignees.compact, issuable)
## EE-specific
end
after_update(issuable)
......
......@@ -376,7 +376,6 @@ POST /projects/:id/issues
| Attribute | Type | Required | Description |
|-------------------------------------------|----------------|----------|--------------|
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
<<<<<<< HEAD
| `title` | string | yes | The title of an issue |
| `description` | string | no | The description of an issue |
| `confidential` | boolean | no | Set an issue to be confidential. Default is `false`. |
......@@ -388,18 +387,6 @@ POST /projects/:id/issues
| `merge_request_to_resolve_discussions_of` | integer | no | The IID of a merge request in which to resolve all issues. This will fill the issue with a default description and mark all discussions as resolved. When passing a description or title, these values will take precedence over the default values.|
| `discussion_to_resolve` | string | no | The ID of a discussion to resolve. This will fill in the issue with a default description and mark the discussion as resolved. Use in combination with `merge_request_to_resolve_discussions_of`. |
| `weight` | integer | no | The weight of the issue in range 0 to 9 |
=======
| `title` | string | yes | The title of an issue |
| `description` | string | no | The description of an issue |
| `confidential` | boolean | no | Set an issue to be confidential. Default is `false`. |
| `assignee_ids` | Array[integer] | no | The ID of the users to assign issue |
| `milestone_id` | integer | no | The ID of a milestone to assign issue |
| `labels` | string | no | Comma-separated label names for an issue |
| `created_at` | string | no | Date time string, ISO 8601 formatted, e.g. `2016-03-11T03:45:40Z` (requires admin or project owner rights) |
| `due_date` | string | no | Date time string in the format YEAR-MONTH-DAY, e.g. `2016-03-11` |
| `merge_request_to_resolve_discussions_of` | integer | no | The IID of a merge request in which to resolve all issues. This will fill the issue with a default description and mark all discussions as resolved. When passing a description or title, these values will take precedence over the default values.|
| `discussion_to_resolve` | string | no | The ID of a discussion to resolve. This will fill in the issue with a default description and mark the discussion as resolved. Use in combination with `merge_request_to_resolve_discussions_of`. |
>>>>>>> upstream/master
```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/4/issues?title=Issues%20with%20auth&labels=bug
......
......@@ -5,18 +5,7 @@ describe 'Auto deploy' do
let(:project) { create(:project, :repository) }
before do
<<<<<<< HEAD
project.create_kubernetes_service(
active: true,
properties: {
namespace: project.path,
api_url: 'https://kubernetes.example.com',
token: 'a' * 40
}
)
=======
create :kubernetes_service, project: project
>>>>>>> upstream/master
project.team << [user, :master]
login_as user
end
......
require 'spec_helper'
<<<<<<< HEAD
describe Gitlab::FileFinder do
let(:project) { create :project }
let(:finder) { described_class.new(project, 'master') }
it 'finds files by name' do
filename, blob = finder.find('CHANGELOG').first
expect(filename).to eq('CHANGELOG')
expect(blob.ref).to eq('master')
end
it 'finds files by content' do
filename, blob = finder.find('CHANGELOG').last
expect(filename).to eq('CONTRIBUTING.md')
expect(blob.filename).to eq('CONTRIBUTING.md')
expect(blob.startline).to be_a(Integer)
expect(blob.data).to include('CHANGELOG')
=======
describe Gitlab::FileFinder, lib: true do
describe '#find' do
let(:project) { create(:project, :public, :repository) }
......@@ -37,6 +17,5 @@ describe Gitlab::FileFinder, lib: true do
expect(blob.filename).to eq("CHANGELOG")
end
>>>>>>> upstream/master
end
end
......@@ -55,12 +55,7 @@ describe Gitlab::ProjectSearchResults, lib: true do
end
it 'finds by name' do
<<<<<<< HEAD
blob = results.select { |result| result.first == 'files/images/wm.svg' }.flatten.last
expect(blob).to be_a(OpenStruct)
=======
expect(results.map(&:first)).to include('files/images/wm.svg')
>>>>>>> upstream/master
end
it 'finds by content' do
......
......@@ -1113,20 +1113,6 @@ describe API::Issues do
expect(json_response['assignees'].first['name']).to eq(user2.name)
end
<<<<<<< HEAD
=======
context 'CE restrictions' do
it 'updates an issue with several assignees but only one has been applied' do
put api("/projects/#{project.id}/issues/#{issue.iid}", user),
assignee_ids: [user2.id, guest.id]
expect(response).to have_http_status(200)
expect(json_response['assignees'].size).to eq(1)
end
end
>>>>>>> upstream/master
end
describe 'PUT /projects/:id/issues/:issue_iid to update labels' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment