Commit db3b102d authored by Phil Hughes's avatar Phil Hughes

Merge branch 'aqualls-mr-capitalization' into 'master'

Fix capitalization of 'merge request'

See merge request gitlab-org/gitlab!58382
parents 499d436d e9b0d74d
# frozen_string_literal: true # frozen_string_literal: true
# This module handles backward compatibility for import/export of Merge Requests after # This module handles backward compatibility for import/export of merge requests after
# multiple assignees feature was introduced. Also, it handles the scenarios where # multiple assignees feature was introduced. Also, it handles the scenarios where
# the #26496 background migration hasn't finished yet. # the #26496 background migration hasn't finished yet.
# Ideally, most of this code should be removed at #59457. # Ideally, most of this code should be removed at #59457.
......
...@@ -221,7 +221,7 @@ class Project < ApplicationRecord ...@@ -221,7 +221,7 @@ class Project < ApplicationRecord
has_one :alerting_setting, inverse_of: :project, class_name: 'Alerting::ProjectAlertingSetting' has_one :alerting_setting, inverse_of: :project, class_name: 'Alerting::ProjectAlertingSetting'
has_one :service_desk_setting, class_name: 'ServiceDeskSetting' has_one :service_desk_setting, class_name: 'ServiceDeskSetting'
# Merge Requests for target project should be removed with it # Merge requests for target project should be removed with it
has_many :merge_requests, foreign_key: 'target_project_id', inverse_of: :target_project has_many :merge_requests, foreign_key: 'target_project_id', inverse_of: :target_project
has_many :merge_request_metrics, foreign_key: 'target_project', class_name: 'MergeRequest::Metrics', inverse_of: :target_project has_many :merge_request_metrics, foreign_key: 'target_project', class_name: 'MergeRequest::Metrics', inverse_of: :target_project
has_many :source_of_merge_requests, foreign_key: 'source_project_id', class_name: 'MergeRequest' has_many :source_of_merge_requests, foreign_key: 'source_project_id', class_name: 'MergeRequest'
......
...@@ -28,7 +28,7 @@ module ChatMessage ...@@ -28,7 +28,7 @@ module ChatMessage
def activity def activity
{ {
title: "Merge Request #{state_or_action_text} by #{user_combined_name}", title: "Merge request #{state_or_action_text} by #{user_combined_name}",
subtitle: "in #{project_link}", subtitle: "in #{project_link}",
text: merge_request_link, text: merge_request_link,
image: user_avatar image: user_avatar
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Base class for CI services # Base class for CI services
# List methods you need to implement to get your CI service # List methods you need to implement to get your CI service
# working with GitLab Merge Requests # working with GitLab merge requests
class CiService < Service class CiService < Service
default_value_for :category, 'ci' default_value_for :category, 'ci'
......
- page_title _('Merge Request Analytics') - page_title _('Merge request analytics')
#js-merge-request-analytics-app{ data: { type: 'group', full_path: @group.full_path, milestones_path: group_milestones_path(@group), labels_path: group_labels_path(@group) } } #js-merge-request-analytics-app{ data: { type: 'group', full_path: @group.full_path, milestones_path: group_milestones_path(@group), labels_path: group_labels_path(@group) } }
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#js_pushes_chart_vue #js_pushes_chart_vue
%div{ data: { qa_selector: 'merge_request_content' } } %div{ data: { qa_selector: 'merge_request_content' } }
%h3= s_('ContributionAnalytics|Merge Requests') %h3= s_('ContributionAnalytics|Merge requests')
- mr_created_count = @data_collector.total_merge_requests_created_count - mr_created_count = @data_collector.total_merge_requests_created_count
- mr_merged_count = @data_collector.total_merge_requests_merged_count - mr_merged_count = @data_collector.total_merge_requests_merged_count
- if mr_created_count > 0 || mr_merged_count > 0 - if mr_created_count > 0 || mr_merged_count > 0
......
Merge Request #{@merge_request.to_reference} was approved by #{sanitize_name(@approved_by.name)} Merge request #{@merge_request.to_reference} was approved by #{sanitize_name(@approved_by.name)}
Merge Request URL: #{project_merge_request_url(@merge_request.target_project, @merge_request)} Merge request URL: #{project_merge_request_url(@merge_request.target_project, @merge_request)}
= merge_path_description(@merge_request, 'to') = merge_path_description(@merge_request, 'to')
......
Merge Request #{@merge_request.to_reference} was unapproved by #{@unapproved_by.name} Merge request #{@merge_request.to_reference} was unapproved by #{@unapproved_by.name}
Merge Request URL: #{project_merge_request_url(@merge_request.target_project, @merge_request)} Merge request URL: #{project_merge_request_url(@merge_request.target_project, @merge_request)}
= merge_path_description(@merge_request, 'to') = merge_path_description(@merge_request, 'to')
......
- page_title _("Merge Request Analytics") - page_title _("Merge request analytics")
#js-merge-request-analytics-app{ data: { type: 'project', full_path: @project.full_path, milestone_path: project_milestones_path(@project), labels_path: project_labels_path(@project, include_ancestor_groups: true) } } #js-merge-request-analytics-app{ data: { type: 'project', full_path: @project.full_path, milestone_path: project_milestones_path(@project), labels_path: project_labels_path(@project, include_ancestor_groups: true) } }
- if show_advanced_search_promotion? - if show_advanced_search_promotion?
.user-callout.promotion-callout.promotion-advanced-search.js-mr-approval-callout#promote_advanced_search{ data: { uid: 'promote_advanced_search_dismissed' } } .user-callout.promotion-callout.promotion-advanced-search.js-mr-approval-callout#promote_advanced_search{ data: { uid: 'promote_advanced_search_dismissed' } }
.bordered-box.content-block .bordered-box.content-block
%button.btn.btn-default.close.js-close-callout{ type: 'button', 'aria-label' => _('Dismiss Merge Request promotion') } %button.btn.btn-default.close.js-close-callout{ type: 'button', 'aria-label' => _('Dismiss merge request promotion') }
= sprite_icon('close', size: 16, css_class: 'dismiss-icon') = sprite_icon('close', size: 16, css_class: 'dismiss-icon')
.svg-container .svg-container
= custom_icon('icon_search_avatar') = custom_icon('icon_search_avatar')
......
...@@ -8573,7 +8573,7 @@ msgstr "" ...@@ -8573,7 +8573,7 @@ msgstr ""
msgid "ContributionAnalytics|Last week" msgid "ContributionAnalytics|Last week"
msgstr "" msgstr ""
msgid "ContributionAnalytics|Merge Requests" msgid "ContributionAnalytics|Merge requests"
msgstr "" msgstr ""
msgid "ContributionAnalytics|No issues for the selected time period." msgid "ContributionAnalytics|No issues for the selected time period."
...@@ -11115,9 +11115,6 @@ msgstr[1] "" ...@@ -11115,9 +11115,6 @@ msgstr[1] ""
msgid "Dismiss DevOps Report introduction" msgid "Dismiss DevOps Report introduction"
msgstr "" msgstr ""
msgid "Dismiss Merge Request promotion"
msgstr ""
msgid "Dismiss Value Stream Analytics introduction box" msgid "Dismiss Value Stream Analytics introduction box"
msgstr "" msgstr ""
...@@ -19440,6 +19437,9 @@ msgstr "" ...@@ -19440,6 +19437,9 @@ msgstr ""
msgid "Merge request (MR) approvals" msgid "Merge request (MR) approvals"
msgstr "" msgstr ""
msgid "Merge request analytics"
msgstr ""
msgid "Merge request approval settings have been updated." msgid "Merge request approval settings have been updated."
msgstr "" msgstr ""
......
...@@ -16,7 +16,7 @@ RSpec.describe ChatMessage::MergeMessage do ...@@ -16,7 +16,7 @@ RSpec.describe ChatMessage::MergeMessage do
project_url: 'http://somewhere.com', project_url: 'http://somewhere.com',
object_attributes: { object_attributes: {
title: "Merge Request title\nSecond line", title: "Merge request title\nSecond line",
id: 10, id: 10,
iid: 100, iid: 100,
assignee_id: 1, assignee_id: 1,
...@@ -35,7 +35,7 @@ RSpec.describe ChatMessage::MergeMessage do ...@@ -35,7 +35,7 @@ RSpec.describe ChatMessage::MergeMessage do
context 'open' do context 'open' do
it 'returns a message regarding opening of merge requests' do it 'returns a message regarding opening of merge requests' do
expect(subject.pretext).to eq( expect(subject.pretext).to eq(
'Test User (test.user) opened merge request <http://somewhere.com/-/merge_requests/100|!100 *Merge Request title*> in <http://somewhere.com|project_name>') 'Test User (test.user) opened merge request <http://somewhere.com/-/merge_requests/100|!100 *Merge request title*> in <http://somewhere.com|project_name>')
expect(subject.attachments).to be_empty expect(subject.attachments).to be_empty
end end
end end
...@@ -46,7 +46,7 @@ RSpec.describe ChatMessage::MergeMessage do ...@@ -46,7 +46,7 @@ RSpec.describe ChatMessage::MergeMessage do
end end
it 'returns a message regarding closing of merge requests' do it 'returns a message regarding closing of merge requests' do
expect(subject.pretext).to eq( expect(subject.pretext).to eq(
'Test User (test.user) closed merge request <http://somewhere.com/-/merge_requests/100|!100 *Merge Request title*> in <http://somewhere.com|project_name>') 'Test User (test.user) closed merge request <http://somewhere.com/-/merge_requests/100|!100 *Merge request title*> in <http://somewhere.com|project_name>')
expect(subject.attachments).to be_empty expect(subject.attachments).to be_empty
end end
end end
...@@ -60,12 +60,12 @@ RSpec.describe ChatMessage::MergeMessage do ...@@ -60,12 +60,12 @@ RSpec.describe ChatMessage::MergeMessage do
context 'open' do context 'open' do
it 'returns a message regarding opening of merge requests' do it 'returns a message regarding opening of merge requests' do
expect(subject.pretext).to eq( expect(subject.pretext).to eq(
'Test User (test.user) opened merge request [!100 *Merge Request title*](http://somewhere.com/-/merge_requests/100) in [project_name](http://somewhere.com)') 'Test User (test.user) opened merge request [!100 *Merge request title*](http://somewhere.com/-/merge_requests/100) in [project_name](http://somewhere.com)')
expect(subject.attachments).to be_empty expect(subject.attachments).to be_empty
expect(subject.activity).to eq({ expect(subject.activity).to eq({
title: 'Merge Request opened by Test User (test.user)', title: 'Merge request opened by Test User (test.user)',
subtitle: 'in [project_name](http://somewhere.com)', subtitle: 'in [project_name](http://somewhere.com)',
text: '[!100 *Merge Request title*](http://somewhere.com/-/merge_requests/100)', text: '[!100 *Merge request title*](http://somewhere.com/-/merge_requests/100)',
image: 'http://someavatar.com' image: 'http://someavatar.com'
}) })
end end
...@@ -78,12 +78,12 @@ RSpec.describe ChatMessage::MergeMessage do ...@@ -78,12 +78,12 @@ RSpec.describe ChatMessage::MergeMessage do
it 'returns a message regarding closing of merge requests' do it 'returns a message regarding closing of merge requests' do
expect(subject.pretext).to eq( expect(subject.pretext).to eq(
'Test User (test.user) closed merge request [!100 *Merge Request title*](http://somewhere.com/-/merge_requests/100) in [project_name](http://somewhere.com)') 'Test User (test.user) closed merge request [!100 *Merge request title*](http://somewhere.com/-/merge_requests/100) in [project_name](http://somewhere.com)')
expect(subject.attachments).to be_empty expect(subject.attachments).to be_empty
expect(subject.activity).to eq({ expect(subject.activity).to eq({
title: 'Merge Request closed by Test User (test.user)', title: 'Merge request closed by Test User (test.user)',
subtitle: 'in [project_name](http://somewhere.com)', subtitle: 'in [project_name](http://somewhere.com)',
text: '[!100 *Merge Request title*](http://somewhere.com/-/merge_requests/100)', text: '[!100 *Merge request title*](http://somewhere.com/-/merge_requests/100)',
image: 'http://someavatar.com' image: 'http://someavatar.com'
}) })
end end
...@@ -97,7 +97,7 @@ RSpec.describe ChatMessage::MergeMessage do ...@@ -97,7 +97,7 @@ RSpec.describe ChatMessage::MergeMessage do
it 'returns a message regarding completed approval of merge requests' do it 'returns a message regarding completed approval of merge requests' do
expect(subject.pretext).to eq( expect(subject.pretext).to eq(
'Test User (test.user) approved merge request <http://somewhere.com/-/merge_requests/100|!100 *Merge Request title*> '\ 'Test User (test.user) approved merge request <http://somewhere.com/-/merge_requests/100|!100 *Merge request title*> '\
'in <http://somewhere.com|project_name>') 'in <http://somewhere.com|project_name>')
expect(subject.attachments).to be_empty expect(subject.attachments).to be_empty
end end
...@@ -110,7 +110,7 @@ RSpec.describe ChatMessage::MergeMessage do ...@@ -110,7 +110,7 @@ RSpec.describe ChatMessage::MergeMessage do
it 'returns a message regarding revocation of completed approval of merge requests' do it 'returns a message regarding revocation of completed approval of merge requests' do
expect(subject.pretext).to eq( expect(subject.pretext).to eq(
'Test User (test.user) unapproved merge request <http://somewhere.com/-/merge_requests/100|!100 *Merge Request title*> '\ 'Test User (test.user) unapproved merge request <http://somewhere.com/-/merge_requests/100|!100 *Merge request title*> '\
'in <http://somewhere.com|project_name>') 'in <http://somewhere.com|project_name>')
expect(subject.attachments).to be_empty expect(subject.attachments).to be_empty
end end
...@@ -123,7 +123,7 @@ RSpec.describe ChatMessage::MergeMessage do ...@@ -123,7 +123,7 @@ RSpec.describe ChatMessage::MergeMessage do
it 'returns a message regarding added approval of merge requests' do it 'returns a message regarding added approval of merge requests' do
expect(subject.pretext).to eq( expect(subject.pretext).to eq(
'Test User (test.user) added their approval to merge request <http://somewhere.com/-/merge_requests/100|!100 *Merge Request title*> '\ 'Test User (test.user) added their approval to merge request <http://somewhere.com/-/merge_requests/100|!100 *Merge request title*> '\
'in <http://somewhere.com|project_name>') 'in <http://somewhere.com|project_name>')
expect(subject.attachments).to be_empty expect(subject.attachments).to be_empty
end end
...@@ -136,7 +136,7 @@ RSpec.describe ChatMessage::MergeMessage do ...@@ -136,7 +136,7 @@ RSpec.describe ChatMessage::MergeMessage do
it 'returns a message regarding revoking approval of merge requests' do it 'returns a message regarding revoking approval of merge requests' do
expect(subject.pretext).to eq( expect(subject.pretext).to eq(
'Test User (test.user) removed their approval from merge request <http://somewhere.com/-/merge_requests/100|!100 *Merge Request title*> '\ 'Test User (test.user) removed their approval from merge request <http://somewhere.com/-/merge_requests/100|!100 *Merge request title*> '\
'in <http://somewhere.com|project_name>') 'in <http://somewhere.com|project_name>')
expect(subject.attachments).to be_empty expect(subject.attachments).to be_empty
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