Commit c080bbcd authored by Rémy Coutable's avatar Rémy Coutable

Resolve conflicts in AutocompleteController, GitPushService, GitTagPushService, and their specs

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 7917088a
...@@ -9,11 +9,7 @@ class AutocompleteController < ApplicationController ...@@ -9,11 +9,7 @@ class AutocompleteController < ApplicationController
@users = @users.where.not(id: params[:skip_users]) if params[:skip_users].present? @users = @users.where.not(id: params[:skip_users]) if params[:skip_users].present?
@users = @users.active @users = @users.active
@users = @users.reorder(:name) @users = @users.reorder(:name)
<<<<<<< HEAD
@users = load_users_by_ability || @users.page(params[:page]).per(params[:per_page]) @users = load_users_by_ability || @users.page(params[:page]).per(params[:per_page])
=======
@users = @users.page(params[:page]).per(params[:per_page])
>>>>>>> upstream/master
if params[:todo_filter].present? && current_user if params[:todo_filter].present? && current_user
@users = @users.todo_authors(current_user.id, params[:todo_state_filter]) @users = @users.todo_authors(current_user.id, params[:todo_state_filter])
......
...@@ -119,11 +119,7 @@ class GitPushService < BaseService ...@@ -119,11 +119,7 @@ class GitPushService < BaseService
EventCreateService.new.push(@project, current_user, build_push_data) EventCreateService.new.push(@project, current_user, build_push_data)
@project.execute_hooks(build_push_data.dup, :push_hooks) @project.execute_hooks(build_push_data.dup, :push_hooks)
@project.execute_services(build_push_data.dup, :push_hooks) @project.execute_services(build_push_data.dup, :push_hooks)
<<<<<<< HEAD Ci::CreatePipelineService.new(@project, current_user, build_push_data).execute(:push, mirror_update: mirror_update)
Ci::CreatePipelineService.new(@project, current_user, build_push_data).execute(mirror_update: mirror_update)
=======
Ci::CreatePipelineService.new(@project, current_user, build_push_data).execute(:push)
>>>>>>> upstream/master
if push_remove_branch? if push_remove_branch?
AfterBranchDeleteService AfterBranchDeleteService
......
...@@ -11,11 +11,7 @@ class GitTagPushService < BaseService ...@@ -11,11 +11,7 @@ class GitTagPushService < BaseService
SystemHooksService.new.execute_hooks(build_system_push_data.dup, :tag_push_hooks) SystemHooksService.new.execute_hooks(build_system_push_data.dup, :tag_push_hooks)
project.execute_hooks(@push_data.dup, :tag_push_hooks) project.execute_hooks(@push_data.dup, :tag_push_hooks)
project.execute_services(@push_data.dup, :tag_push_hooks) project.execute_services(@push_data.dup, :tag_push_hooks)
<<<<<<< HEAD Ci::CreatePipelineService.new(project, current_user, @push_data).execute(:push, mirror_update: params[:mirror_update])
Ci::CreatePipelineService.new(project, current_user, @push_data).execute(mirror_update: params[:mirror_update])
=======
Ci::CreatePipelineService.new(project, current_user, @push_data).execute(:push)
>>>>>>> upstream/master
ProjectCacheWorker.perform_async(project.id, [], [:commit_count, :repository_size]) ProjectCacheWorker.perform_async(project.id, [], [:commit_count, :repository_size])
true true
......
...@@ -24,11 +24,7 @@ describe AutocompleteController do ...@@ -24,11 +24,7 @@ describe AutocompleteController do
it { expect(body).to be_kind_of(Array) } it { expect(body).to be_kind_of(Array) }
it { expect(body.size).to eq 2 } it { expect(body.size).to eq 2 }
<<<<<<< HEAD
it { expect(body.map { |u| u["username"] }).to match_array([user.username, user2.username]) } it { expect(body.map { |u| u["username"] }).to match_array([user.username, user2.username]) }
=======
it { expect(body.map { |u| u["username"] }).to include(user.username) }
>>>>>>> upstream/master
end end
describe 'GET #users with unknown project' do describe 'GET #users with unknown project' do
......
...@@ -145,9 +145,6 @@ describe GitPushService, services: true do ...@@ -145,9 +145,6 @@ describe GitPushService, services: true do
end end
end end
<<<<<<< HEAD
describe "ES indexing" do
=======
describe "Pipelines" do describe "Pipelines" do
subject { execute_service(project, user, @oldrev, @newrev, @ref) } subject { execute_service(project, user, @oldrev, @newrev, @ref) }
...@@ -161,8 +158,7 @@ describe GitPushService, services: true do ...@@ -161,8 +158,7 @@ describe GitPushService, services: true do
end end
end end
describe "Push Event" do describe "ES indexing" do
>>>>>>> upstream/master
before do before do
stub_application_setting(elasticsearch_search: true, elasticsearch_indexing: true) stub_application_setting(elasticsearch_search: true, elasticsearch_indexing: true)
end end
...@@ -483,20 +479,12 @@ describe GitPushService, services: true do ...@@ -483,20 +479,12 @@ describe GitPushService, services: true do
stub_jira_urls("JIRA-1") stub_jira_urls("JIRA-1")
allow(closing_commit).to receive_messages({ allow(closing_commit).to receive_messages({
<<<<<<< HEAD
issue_closing_regex: Regexp.new(Gitlab.config.gitlab.issue_closing_pattern),
safe_message: message,
author_name: commit_author.name,
author_email: commit_author.email
})
=======
issue_closing_regex: Regexp.new(Gitlab.config.gitlab.issue_closing_pattern), issue_closing_regex: Regexp.new(Gitlab.config.gitlab.issue_closing_pattern),
safe_message: message, safe_message: message,
author_name: commit_author.name, author_name: commit_author.name,
author_email: commit_author.email author_email: commit_author.email
}) })
allow(JIRA::Resource::Remotelink).to receive(:all).and_return([]) allow(JIRA::Resource::Remotelink).to receive(:all).and_return([])
>>>>>>> upstream/master
allow(project.repository).to receive_messages(commits_between: [closing_commit]) allow(project.repository).to receive_messages(commits_between: [closing_commit])
end end
......
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