Commit a7041e34 authored by Phil Hughes's avatar Phil Hughes

Merge branch '327271-aqualls-fast-forward-message' into 'master'

Make rebase-required messages clearer for users

See merge request gitlab-org/gitlab!59422
parents 9208371e 600466f6
......@@ -112,7 +112,7 @@ export default {
<div v-else class="media-body space-children gl-display-flex gl-align-items-center">
<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.`)
}}
</span>
......
......@@ -87,9 +87,7 @@ export default {
},
fastForwardMergeText() {
return sprintf(
__(
'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.'),
{
targetBranch: `<span class="label-branch">${escape(this.targetBranch)}</span>`,
},
......@@ -193,9 +191,7 @@ export default {
data-testid="rebase-message"
data-qa-selector="no_fast_forward_message_content"
>{{
__(
'Fast-forward merge is not possible. Rebase the source branch onto the target branch.',
)
__('Merge blocked: the source branch must be rebased onto the target branch.')
}}</span
>
<span v-else class="gl-font-weight-bold danger" data-testid="rebase-message">{{
......
......@@ -13602,12 +13602,6 @@ msgstr ""
msgid "Fast timeout"
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"
msgstr ""
......@@ -20426,6 +20420,9 @@ msgstr ""
msgid "Merge automatically (%{strategy})"
msgstr ""
msgid "Merge blocked: the source branch must be rebased onto the target branch."
msgstr ""
msgid "Merge commit SHA"
msgstr ""
......@@ -38979,9 +38976,6 @@ msgstr ""
msgid "mrWidget|Failed to load deployment statistics"
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"
msgstr ""
......@@ -39009,6 +39003,9 @@ msgstr ""
msgid "mrWidget|Merge blocked: all threads must be resolved."
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."
msgstr ""
......
......@@ -373,7 +373,7 @@ RSpec.describe 'Merge request > User sees merge widget', :js do
wait_for_requests
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
......
......@@ -70,9 +70,9 @@ describe('Merge request widget rebase component', () => {
const text = findRebaseMessageElText();
expect(text).toContain('Fast-forward merge is not possible.');
expect(text).toContain('Merge blocked');
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', () => {
const text = findRebaseMessageElText();
expect(text).toContain('Fast-forward merge is not possible.');
expect(text).toContain('Rebase the source branch onto');
expect(text).toContain('foo');
expect(text.replace(/\s\s+/g, ' ')).toContain(
'to allow this merge request to be merged.',
expect(text).toContain(
'Merge blocked: the source branch must be rebased onto the target branch.',
);
expect(text).toContain('the source branch must be rebased');
});
it('should render the correct target branch name', () => {
......@@ -136,7 +134,7 @@ describe('Merge request widget rebase component', () => {
const elem = findRebaseMessageEl();
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', () => {
});
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