From 5ca7aef65a521c446cb02a7e8810e13ae11c0d48 Mon Sep 17 00:00:00 2001
From: Amy Qualls <aqualls@gitlab.com>
Date: Fri, 9 Jun 2023 12:01:01 +0000
Subject: [PATCH] Update language from MWPS to auto-merge

In various user-facing templates and messaging, update the outdated
MWPS language to instead use auto-merge. These changes make ancillary
pieces of the product more accurately reflect what the user now sees
in the UI.

Changelog: changed
---
 .gitlab/merge_request_templates/Deprecations.md               | 2 +-
 .gitlab/merge_request_templates/Removals.md                   | 2 +-
 .../new_project_readme_content/readme_advanced.md.tt          | 2 +-
 app/views/notify/merge_when_pipeline_succeeds_email.html.haml | 4 ++--
 app/views/notify/merge_when_pipeline_succeeds_email.text.haml | 2 +-
 app/views/projects/readme_templates/default.md.tt             | 2 +-
 locale/gitlab.pot                                             | 4 ++--
 spec/mailers/emails/merge_requests_spec.rb                    | 2 +-
 8 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/.gitlab/merge_request_templates/Deprecations.md b/.gitlab/merge_request_templates/Deprecations.md
index fa53b9c800ac5..7e622dbe62ccc 100644
--- a/.gitlab/merge_request_templates/Deprecations.md
+++ b/.gitlab/merge_request_templates/Deprecations.md
@@ -98,7 +98,7 @@ must be updated before this MR is merged:
    If you want to double check that it worked, you can run `bin/rake gitlab:docs:check_deprecations`
    to verify that the doc is up to date.
 1. Commit the updated file and push the changes.
-1. Set the MR to merge when the pipeline succeeds (or merge if the pipeline is already complete).
+1. Set the merge request to auto-merge, or if the pipeline is already complete, merge.
 
 If you have trouble running the Rake task, check the [troubleshooting steps](https://about.gitlab.com/handbook/marketing/blog/release-posts/#deprecation-rake-task-troubleshooting).
 
diff --git a/.gitlab/merge_request_templates/Removals.md b/.gitlab/merge_request_templates/Removals.md
index 4a9efcf364d22..d2224a71e657a 100644
--- a/.gitlab/merge_request_templates/Removals.md
+++ b/.gitlab/merge_request_templates/Removals.md
@@ -105,6 +105,6 @@ must be updated before this MR is merged:
    If you want to double check that it worked, you can run `bin/rake gitlab:docs:check_removals`
    to verify that the doc is up to date.
 1. Commit the updated file and push the changes.
-1. Set the MR to merge when the pipeline succeeds (or merge if the pipeline is already complete).
+1. Set the merge request to auto-merge, or if the pipeline is already complete, merge.
 
 If you have trouble running the rake task, check the [troubleshooting steps](https://about.gitlab.com/handbook/marketing/blog/release-posts/#deprecation-rake-task-troubleshooting).
diff --git a/app/experiments/templates/new_project_readme_content/readme_advanced.md.tt b/app/experiments/templates/new_project_readme_content/readme_advanced.md.tt
index e1dddcb2c66b4..4f9c00980e11e 100644
--- a/app/experiments/templates/new_project_readme_content/readme_advanced.md.tt
+++ b/app/experiments/templates/new_project_readme_content/readme_advanced.md.tt
@@ -31,7 +31,7 @@ git push -uf origin <%= @project.default_branch_or_main %>
 - [ ] [Create a new merge request](<%= redirect("https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html") %>)
 - [ ] [Automatically close issues from merge requests](<%= redirect("https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically") %>)
 - [ ] [Enable merge request approvals](<%= redirect("https://docs.gitlab.com/ee/user/project/merge_requests/approvals/") %>)
-- [ ] [Automatically merge when pipeline succeeds](<%= redirect("https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html") %>)
+- [ ] [Set auto-merge](<%= redirect("https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html") %>)
 
 ## Test and Deploy
 
diff --git a/app/views/notify/merge_when_pipeline_succeeds_email.html.haml b/app/views/notify/merge_when_pipeline_succeeds_email.html.haml
index f6b517d6e34dc..9c25567696f08 100644
--- a/app/views/notify/merge_when_pipeline_succeeds_email.html.haml
+++ b/app/views/notify/merge_when_pipeline_succeeds_email.html.haml
@@ -78,7 +78,7 @@
                                   %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;vertical-align:middle;color:#ffffff;text-align:center;padding-right:5px;" }
                                     %img{ alt: "✓", height: "13", src: image_url('mailers/ci_pipeline_notif_v1/icon-check-green-inverted.gif'), style: "display:block;", width: "13" }
                                   %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;vertical-align:middle;color:#ffffff;text-align:center;" }
-                                    %span= _('Merge request was scheduled to merge after pipeline succeeds')
+                                    %span= _('Merge request was set to auto-merge')
                       %tr.spacer
                         %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;height:18px;font-size:18px;line-height:18px;" }
                           &nbsp;
@@ -91,7 +91,7 @@
                                   %img{ src: image_url('mailers/approval/icon-merge-request-gray.gif'), style: "height:18px;width:18px;margin-bottom:-4px;", alt: "Merge request icon" }
                                   %span{ style: "font-weight: 600;color:#333333;" }= _('Merge request')
                                   %a{ href: merge_request_url(@merge_request), style: "font-weight: 600;color:#3777b0;text-decoration:none" }= @merge_request.to_reference
-                                  %span= _('was scheduled to merge after pipeline succeeds by')
+                                  %span= _('was set to auto-merge by')
                                   %img.avatar{ height: "24", src: avatar_icon_for_user(@mwps_set_by, 24, only_path: false), style: "border-radius:12px;margin:-7px 0 -7px 3px;", width: "24", alt: "Avatar" }
                                   %a.muted{ href: user_url(@mwps_set_by), style: "color:#333333;text-decoration:none;" }
                                     = @mwps_set_by.name
diff --git a/app/views/notify/merge_when_pipeline_succeeds_email.text.haml b/app/views/notify/merge_when_pipeline_succeeds_email.text.haml
index dbf742a5cbc6e..cbaa88befd267 100644
--- a/app/views/notify/merge_when_pipeline_succeeds_email.text.haml
+++ b/app/views/notify/merge_when_pipeline_succeeds_email.text.haml
@@ -1,4 +1,4 @@
-Merge request #{@merge_request.to_reference} was scheduled to merge after pipeline succeeds by #{sanitize_name(@mwps_set_by.name)}
+Merge request #{@merge_request.to_reference} was set to auto-merge by #{sanitize_name(@mwps_set_by.name)}
 
 Merge request url: #{project_merge_request_url(@merge_request.target_project, @merge_request)}
 
diff --git a/app/views/projects/readme_templates/default.md.tt b/app/views/projects/readme_templates/default.md.tt
index ad1d6cce08dd8..779b87336ea89 100644
--- a/app/views/projects/readme_templates/default.md.tt
+++ b/app/views/projects/readme_templates/default.md.tt
@@ -31,7 +31,7 @@ git push -uf origin <%= params[:default_branch] %>
 - [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
 - [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
 - [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
-- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
+- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
 
 ## Test and Deploy
 
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index d8561f4f2a09f..b39c4d93383db 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -28384,7 +28384,7 @@ msgstr ""
 msgid "Merge request title"
 msgstr ""
 
-msgid "Merge request was scheduled to merge after pipeline succeeds"
+msgid "Merge request was set to auto-merge"
 msgstr ""
 
 msgid "Merge requests"
@@ -55280,7 +55280,7 @@ msgstr ""
 msgid "vulnerability|dismissed"
 msgstr ""
 
-msgid "was scheduled to merge after pipeline succeeds by"
+msgid "was set to auto-merge by"
 msgstr ""
 
 msgid "weekly"
diff --git a/spec/mailers/emails/merge_requests_spec.rb b/spec/mailers/emails/merge_requests_spec.rb
index 9a8d1e1279b63..b587c5195da7f 100644
--- a/spec/mailers/emails/merge_requests_spec.rb
+++ b/spec/mailers/emails/merge_requests_spec.rb
@@ -170,7 +170,7 @@
   end
 
   describe "#merge_when_pipeline_succeeds_email" do
-    let(:title) { "Merge request #{merge_request.to_reference} was scheduled to merge after pipeline succeeds by #{current_user.name}" }
+    let(:title) { "Merge request #{merge_request.to_reference} was set to auto-merge by #{current_user.name}" }
 
     subject { Notify.merge_when_pipeline_succeeds_email(recipient.id, merge_request.id, current_user.id) }
 
-- 
GitLab