Commit e897c593 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents 9d5c2099 573bc5f6
...@@ -761,7 +761,7 @@ ...@@ -761,7 +761,7 @@
changes: *code-qa-patterns changes: *code-qa-patterns
when: manual when: manual
allow_failure: true allow_failure: true
- <<: *if-master-refs - <<: *if-dot-com-gitlab-org-schedule
allow_failure: true allow_failure: true
.review:rules:danger: .review:rules:danger:
......
...@@ -85,6 +85,11 @@ export const conditions = flattenDeep( ...@@ -85,6 +85,11 @@ export const conditions = flattenDeep(
tokenKey: 'assignee', tokenKey: 'assignee',
value: __('Any'), value: __('Any'),
}, },
{
url: 'author_username=support-bot',
tokenKey: 'author',
value: 'support-bot',
},
{ {
url: 'milestone_title=None', url: 'milestone_title=None',
tokenKey: 'milestone', tokenKey: 'milestone',
......
...@@ -26,7 +26,7 @@ module Branches ...@@ -26,7 +26,7 @@ module Branches
message: 'Failed to remove branch', message: 'Failed to remove branch',
http_status: 400) http_status: 400)
end end
rescue Gitlab::Git::PreReceiveError => ex rescue Gitlab::Git::PreReceiveError, Gitlab::Git::CommandError => ex
ServiceResponse.error(message: ex.message, http_status: 400) ServiceResponse.error(message: ex.message, http_status: 400)
end end
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
- support_bot_attrs = { service_desk_enabled: @project.service_desk_enabled?, **UserSerializer.new.represent(User.support_bot) }.to_json - support_bot_attrs = { service_desk_enabled: @project.service_desk_enabled?, **UserSerializer.new.represent(User.support_bot) }.to_json
- data_endpoint = "#{expose_path(api_v4_projects_issues_path(id: @project.id))}?author_id=#{User.support_bot.id}" - data_endpoint = "#{expose_path(api_v4_projects_issues_path(id: @project.id))}?author_username=#{User.support_bot.username}"
%div{ class: "js-service-desk-issues service-desk-issues", data: { support_bot: support_bot_attrs, service_desk_meta: service_desk_meta(@project) } } %div{ class: "js-service-desk-issues service-desk-issues", data: { support_bot: support_bot_attrs, service_desk_meta: service_desk_meta(@project) } }
.top-area .top-area
......
---
title: Fix unfinished merge by Merge Train process
merge_request: 41106
author:
type: fixed
---
title: Fix the filtered search bar to work in the service desk issue list
merge_request: 40797
author:
type: fixed
...@@ -109,6 +109,14 @@ RSpec.describe 'Service Desk Issue Tracker', :js do ...@@ -109,6 +109,14 @@ RSpec.describe 'Service Desk Issue Tracker', :js do
find('.input-token .filtered-search').native.send_key(:backspace) find('.input-token .filtered-search').native.send_key(:backspace)
expect(page).to have_selector('.js-visual-token', count: 1) expect(page).to have_selector('.js-visual-token', count: 1)
end end
it 'support bot author token has been properly added' do
within('.filtered-search-token') do
expect(page).to have_selector('.name', count: 1, visible: false)
expect(page).to have_selector('.operator', count: 1, visible: false)
expect(page).to have_selector('.value-container', count: 1, visible: false)
end
end
end end
end end
end end
......
...@@ -37,6 +37,21 @@ RSpec.describe Branches::DeleteService do ...@@ -37,6 +37,21 @@ RSpec.describe Branches::DeleteService do
end end
it_behaves_like 'a deleted branch', 'feature' it_behaves_like 'a deleted branch', 'feature'
context 'when Gitlab::Git::CommandError is raised' do
before do
allow(repository).to receive(:rm_branch) do
raise Gitlab::Git::CommandError.new('Could not update patch')
end
end
it 'handles and returns error' do
result = service.execute('feature')
expect(result.status).to eq(:error)
expect(result.message).to eq('Could not update patch')
end
end
end end
context 'when user does not have access to push to repository' do context 'when user does not have access to push to repository' do
......
...@@ -21,7 +21,7 @@ module StubObjectStorage ...@@ -21,7 +21,7 @@ module StubObjectStorage
proxy_download: false, proxy_download: false,
background_upload: false, background_upload: false,
direct_upload: false direct_upload: false
) )
allow(config).to receive(:enabled) { enabled } allow(config).to receive(:enabled) { enabled }
allow(config).to receive(:proxy_download) { proxy_download } allow(config).to receive(:proxy_download) { proxy_download }
allow(config).to receive(:background_upload) { background_upload } allow(config).to receive(:background_upload) { background_upload }
......
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