Commit 600466f6 authored by Amy Qualls's avatar Amy Qualls Committed by Phil Hughes

Make rebase-required messages clearer for users

parent 8f5e1ce0
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
<div v-else class="media-body space-children gl-display-flex gl-align-items-center"> <div v-else class="media-body space-children gl-display-flex gl-align-items-center">
<span v-if="shouldBeRebased" class="bold"> <span v-if="shouldBeRebased" class="bold">
{{ {{
s__(`mrWidget|Fast-forward merge is not possible. s__(`mrWidget|Merge blocked: fast-forward merge is not possible.
To merge this request, first rebase locally.`) To merge this request, first rebase locally.`)
}} }}
</span> </span>
......
...@@ -87,9 +87,7 @@ export default { ...@@ -87,9 +87,7 @@ export default {
}, },
fastForwardMergeText() { fastForwardMergeText() {
return sprintf( return sprintf(
__( __('Merge blocked: the source branch must be rebased onto the target branch.'),
'Fast-forward merge is not possible. Rebase the source branch onto %{targetBranch} to allow this merge request to be merged.',
),
{ {
targetBranch: `<span class="label-branch">${escape(this.targetBranch)}</span>`, targetBranch: `<span class="label-branch">${escape(this.targetBranch)}</span>`,
}, },
...@@ -193,9 +191,7 @@ export default { ...@@ -193,9 +191,7 @@ export default {
data-testid="rebase-message" data-testid="rebase-message"
data-qa-selector="no_fast_forward_message_content" data-qa-selector="no_fast_forward_message_content"
>{{ >{{
__( __('Merge blocked: the source branch must be rebased onto the target branch.')
'Fast-forward merge is not possible. Rebase the source branch onto the target branch.',
)
}}</span }}</span
> >
<span v-else class="gl-font-weight-bold danger" data-testid="rebase-message">{{ <span v-else class="gl-font-weight-bold danger" data-testid="rebase-message">{{
......
...@@ -13602,12 +13602,6 @@ msgstr "" ...@@ -13602,12 +13602,6 @@ msgstr ""
msgid "Fast timeout" msgid "Fast timeout"
msgstr "" msgstr ""
msgid "Fast-forward merge is not possible. Rebase the source branch onto %{targetBranch} to allow this merge request to be merged."
msgstr ""
msgid "Fast-forward merge is not possible. Rebase the source branch onto the target branch."
msgstr ""
msgid "Fast-forward merge without a merge commit" msgid "Fast-forward merge without a merge commit"
msgstr "" msgstr ""
...@@ -20426,6 +20420,9 @@ msgstr "" ...@@ -20426,6 +20420,9 @@ msgstr ""
msgid "Merge automatically (%{strategy})" msgid "Merge automatically (%{strategy})"
msgstr "" msgstr ""
msgid "Merge blocked: the source branch must be rebased onto the target branch."
msgstr ""
msgid "Merge commit SHA" msgid "Merge commit SHA"
msgstr "" msgstr ""
...@@ -38979,9 +38976,6 @@ msgstr "" ...@@ -38979,9 +38976,6 @@ msgstr ""
msgid "mrWidget|Failed to load deployment statistics" msgid "mrWidget|Failed to load deployment statistics"
msgstr "" msgstr ""
msgid "mrWidget|Fast-forward merge is not possible. To merge this request, first rebase locally."
msgstr ""
msgid "mrWidget|If the %{missingBranchName} branch exists in your local repository, you can merge this merge request manually using the command line" msgid "mrWidget|If the %{missingBranchName} branch exists in your local repository, you can merge this merge request manually using the command line"
msgstr "" msgstr ""
...@@ -39009,6 +39003,9 @@ msgstr "" ...@@ -39009,6 +39003,9 @@ msgstr ""
msgid "mrWidget|Merge blocked: all threads must be resolved." msgid "mrWidget|Merge blocked: all threads must be resolved."
msgstr "" msgstr ""
msgid "mrWidget|Merge blocked: fast-forward merge is not possible. To merge this request, first rebase locally."
msgstr ""
msgid "mrWidget|Merge blocked: pipeline must succeed. It's waiting for a manual action to continue." msgid "mrWidget|Merge blocked: pipeline must succeed. It's waiting for a manual action to continue."
msgstr "" msgstr ""
......
...@@ -373,7 +373,7 @@ RSpec.describe 'Merge request > User sees merge widget', :js do ...@@ -373,7 +373,7 @@ RSpec.describe 'Merge request > User sees merge widget', :js do
wait_for_requests wait_for_requests
page.within('.mr-widget-body') do page.within('.mr-widget-body') do
expect(page).to have_content('Fast-forward merge is not possible') expect(page).to have_content('Merge Merge blocked: fast-forward merge is not possible. To merge this request, first rebase locally.')
end end
end end
end end
......
...@@ -70,9 +70,9 @@ describe('Merge request widget rebase component', () => { ...@@ -70,9 +70,9 @@ describe('Merge request widget rebase component', () => {
const text = findRebaseMessageElText(); const text = findRebaseMessageElText();
expect(text).toContain('Fast-forward merge is not possible.'); expect(text).toContain('Merge blocked');
expect(text.replace(/\s\s+/g, ' ')).toContain( expect(text.replace(/\s\s+/g, ' ')).toContain(
'Rebase the source branch onto the target branch.', 'the source branch must be rebased onto the target branch',
); );
}); });
...@@ -111,12 +111,10 @@ describe('Merge request widget rebase component', () => { ...@@ -111,12 +111,10 @@ describe('Merge request widget rebase component', () => {
const text = findRebaseMessageElText(); const text = findRebaseMessageElText();
expect(text).toContain('Fast-forward merge is not possible.'); expect(text).toContain(
expect(text).toContain('Rebase the source branch onto'); 'Merge blocked: the source branch must be rebased onto the target branch.',
expect(text).toContain('foo');
expect(text.replace(/\s\s+/g, ' ')).toContain(
'to allow this merge request to be merged.',
); );
expect(text).toContain('the source branch must be rebased');
}); });
it('should render the correct target branch name', () => { it('should render the correct target branch name', () => {
...@@ -136,7 +134,7 @@ describe('Merge request widget rebase component', () => { ...@@ -136,7 +134,7 @@ describe('Merge request widget rebase component', () => {
const elem = findRebaseMessageEl(); const elem = findRebaseMessageEl();
expect(elem.text()).toContain( expect(elem.text()).toContain(
`Fast-forward merge is not possible. Rebase the source branch onto ${targetBranch} to allow this merge request to be merged.`, `Merge blocked: the source branch must be rebased onto the target branch.`,
); );
}); });
}); });
......
...@@ -199,7 +199,7 @@ describe('MRWidgetConflicts', () => { ...@@ -199,7 +199,7 @@ describe('MRWidgetConflicts', () => {
}); });
expect(removeBreakLine(wrapper.text()).trim()).toContain( expect(removeBreakLine(wrapper.text()).trim()).toContain(
'Fast-forward merge is not possible. To merge this request, first rebase locally.', 'Merge blocked: fast-forward merge is not possible. To merge this request, first rebase locally.',
); );
}); });
}); });
......
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