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
@users = @users.where.not(id: params[:skip_users]) if params[:skip_users].present?
@users = @users.active
@users = @users.reorder(:name)
<<<<<<< HEAD
@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
@users = @users.todo_authors(current_user.id, params[:todo_state_filter])
......
......@@ -119,11 +119,7 @@ class GitPushService < BaseService
EventCreateService.new.push(@project, current_user, build_push_data)
@project.execute_hooks(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(mirror_update: mirror_update)
=======
Ci::CreatePipelineService.new(@project, current_user, build_push_data).execute(:push)
>>>>>>> upstream/master
Ci::CreatePipelineService.new(@project, current_user, build_push_data).execute(:push, mirror_update: mirror_update)
if push_remove_branch?
AfterBranchDeleteService
......
......@@ -11,11 +11,7 @@ class GitTagPushService < BaseService
SystemHooksService.new.execute_hooks(build_system_push_data.dup, :tag_push_hooks)
project.execute_hooks(@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(mirror_update: params[:mirror_update])
=======
Ci::CreatePipelineService.new(project, current_user, @push_data).execute(:push)
>>>>>>> upstream/master
Ci::CreatePipelineService.new(project, current_user, @push_data).execute(:push, mirror_update: params[:mirror_update])
ProjectCacheWorker.perform_async(project.id, [], [:commit_count, :repository_size])
true
......
......@@ -24,11 +24,7 @@ describe AutocompleteController do
it { expect(body).to be_kind_of(Array) }
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 include(user.username) }
>>>>>>> upstream/master
end
describe 'GET #users with unknown project' do
......
......@@ -145,9 +145,6 @@ describe GitPushService, services: true do
end
end
<<<<<<< HEAD
describe "ES indexing" do
=======
describe "Pipelines" do
subject { execute_service(project, user, @oldrev, @newrev, @ref) }
......@@ -161,8 +158,7 @@ describe GitPushService, services: true do
end
end
describe "Push Event" do
>>>>>>> upstream/master
describe "ES indexing" do
before do
stub_application_setting(elasticsearch_search: true, elasticsearch_indexing: true)
end
......@@ -200,7 +196,7 @@ describe GitPushService, services: true do
execute_service(project, user, blankrev, 'newrev', ref)
end
end
context "Sends System Push data" do
it "when pushing on a branch" do
expect(SystemHookPushWorker).to receive(:perform_async).with(push_data, :push_hooks)
......@@ -483,20 +479,12 @@ describe GitPushService, services: true do
stub_jira_urls("JIRA-1")
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),
safe_message: message,
author_name: commit_author.name,
author_email: commit_author.email
})
allow(JIRA::Resource::Remotelink).to receive(:all).and_return([])
>>>>>>> upstream/master
allow(project.repository).to receive_messages(commits_between: [closing_commit])
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