Commit 01234de8 authored by Amy Qualls's avatar Amy Qualls Committed by Marc Shaw

Revise error message

Make the error message more concise and polished.
parent 4224b844
...@@ -403,7 +403,7 @@ Parameters: ...@@ -403,7 +403,7 @@ Parameters:
| `merge_request_iid` | integer | yes | The IID of a project merge request | | `merge_request_iid` | integer | yes | The IID of a project merge request |
| `body` | string | yes | The content of a note. Limited to 1,000,000 characters. | | `body` | string | yes | The content of a note. Limited to 1,000,000 characters. |
| `created_at` | string | no | Date time string, ISO 8601 formatted. Example: `2016-03-11T03:45:40Z` (requires administrator or project/group owner rights) | | `created_at` | string | no | Date time string, ISO 8601 formatted. Example: `2016-03-11T03:45:40Z` (requires administrator or project/group owner rights) |
| `merge_request_diff_sha`| string | no | The SHA of the head commit which is used to ensure that the merge request hasn't been updated since the API request was sent. This is required for the /merge quick action | | `merge_request_diff_sha`| string | no | Required for the `/merge` [quick action](../user/project/quick_actions.md). The SHA of the head commit, which ensures the merge request wasn't updated after the API request was sent. |
### Modify existing merge request note ### Modify existing merge request note
......
...@@ -24,7 +24,7 @@ module Gitlab ...@@ -24,7 +24,7 @@ module Gitlab
end end
execution_message do execution_message do
if params[:merge_request_diff_head_sha].blank? if params[:merge_request_diff_head_sha].blank?
_("Merge request diff sha parameter is required for the merge quick action.") _("The `/merge` quick action requires the SHA of the head of the branch.")
elsif params[:merge_request_diff_head_sha] != quick_action_target.diff_head_sha elsif params[:merge_request_diff_head_sha] != quick_action_target.diff_head_sha
_("Branch has been updated since the merge was requested.") _("Branch has been updated since the merge was requested.")
elsif preferred_strategy = preferred_auto_merge_strategy(quick_action_target) elsif preferred_strategy = preferred_auto_merge_strategy(quick_action_target)
......
...@@ -23439,9 +23439,6 @@ msgstr "" ...@@ -23439,9 +23439,6 @@ msgstr ""
msgid "Merge request dependencies" msgid "Merge request dependencies"
msgstr "" msgstr ""
msgid "Merge request diff sha parameter is required for the merge quick action."
msgstr ""
msgid "Merge request events" msgid "Merge request events"
msgstr "" msgstr ""
...@@ -37131,6 +37128,9 @@ msgstr "" ...@@ -37131,6 +37128,9 @@ msgstr ""
msgid "The URLs for connecting to Elasticsearch. For clustering, add the URLs separated by commas." msgid "The URLs for connecting to Elasticsearch. For clustering, add the URLs separated by commas."
msgstr "" msgstr ""
msgid "The `/merge` quick action requires the SHA of the head of the branch."
msgstr ""
msgid "The application will be used where the client secret can be kept confidential. Native mobile apps and Single Page Apps are considered non-confidential." msgid "The application will be used where the client secret can be kept confidential. Native mobile apps and Single Page Apps are considered non-confidential."
msgstr "" msgstr ""
......
...@@ -800,7 +800,7 @@ RSpec.describe QuickActions::InterpretService do ...@@ -800,7 +800,7 @@ RSpec.describe QuickActions::InterpretService do
let(:project) { repository_project } let(:project) { repository_project }
let(:service) { described_class.new(project, developer, {}) } let(:service) { described_class.new(project, developer, {}) }
it_behaves_like 'failed command', 'Merge request diff sha parameter is required for the merge quick action.' do it_behaves_like 'failed command', 'The `/merge` quick action requires the SHA of the head of the branch.' do
let(:content) { "/merge" } let(:content) { "/merge" }
let(:issuable) { merge_request } let(:issuable) { merge_request }
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