Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/vue_merge_request_widget/components/mr_widget_how_to_merge_modal.vue')
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/mr_widget_how_to_merge_modal.vue58
1 files changed, 19 insertions, 39 deletions
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_how_to_merge_modal.vue b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_how_to_merge_modal.vue
index c2a3ae361ca..20284c4a3d8 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_how_to_merge_modal.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_how_to_merge_modal.vue
@@ -19,20 +19,18 @@ export default {
},
step3: {
label: __('Step 3.'),
- help: __(
- 'Merge the feature branch into the target branch and fix any conflicts. %{linkStart}How do I fix them?%{linkEnd}',
- ),
+ help: __('Resolve any conflicts. %{linkStart}How do I fix them?%{linkEnd}'),
},
step4: {
label: __('Step 4.'),
- help: __('Push the target branch up to GitLab.'),
+ help: __('Push the source branch up to GitLab.'),
},
},
copyCommands: __('Copy commands'),
tip: __(
- '%{strongStart}Tip:%{strongEnd} You can also check out merge requests locally. %{linkStart}Learn more.%{linkEnd}',
+ '%{strongStart}Tip:%{strongEnd} You can also %{linkStart}check out with merge request ID%{linkEnd}.',
),
- title: __('Check out, review, and merge locally'),
+ title: __('Check out, review, and resolve locally'),
},
components: {
GlModal,
@@ -93,21 +91,11 @@ export default {
: `git fetch origin\ngit checkout -b ${this.escapedSourceBranch} ${escapedOriginBranch}`;
},
mergeInfo2() {
- return this.isFork
- ? `git fetch origin\ngit checkout ${this.escapedTargetBranch}\ngit merge --no-ff ${this.escapedForkBranch}`
- : `git fetch origin\ngit checkout ${this.escapedTargetBranch}\ngit merge --no-ff ${this.escapedSourceBranch}`;
- },
- mergeInfo3() {
- return this.canMerge
- ? `git push origin ${this.escapedTargetBranch}`
- : __('Note that pushing to GitLab requires write access to this repository.');
+ return `git push origin ${this.escapedSourceBranch}`;
},
escapedForkBranch() {
return escapeShellString(`${this.sourceProjectPath}-${this.sourceBranch}`);
},
- escapedTargetBranch() {
- return escapeShellString(this.targetBranch);
- },
escapedSourceBranch() {
return escapeShellString(this.sourceBranch);
},
@@ -145,6 +133,18 @@ export default {
class="gl-shadow-none! gl-bg-transparent! gl-flex-shrink-0"
/>
</div>
+ <p v-if="reviewingDocsPath">
+ <gl-sprintf data-testid="docs-tip" :message="$options.i18n.tip">
+ <template #strong="{ content }">
+ <strong>{{ content }}</strong>
+ </template>
+ <template #link="{ content }">
+ <gl-link class="gl-display-inline-block" :href="reviewingDocsPath" target="_blank">{{
+ content
+ }}</gl-link>
+ </template>
+ </gl-sprintf>
+ </p>
<p>
<strong>
@@ -164,14 +164,6 @@ export default {
</template>
</gl-sprintf>
</p>
- <div class="gl-display-flex">
- <pre class="gl-w-full" data-testid="how-to-merge-instructions">{{ mergeInfo2 }}</pre>
- <clipboard-button
- :text="mergeInfo2"
- :title="$options.i18n.copyCommands"
- class="gl-shadow-none! gl-bg-transparent! gl-flex-shrink-0"
- />
- </div>
<p>
<strong>
{{ $options.i18n.steps.step4.label }}
@@ -179,24 +171,12 @@ export default {
{{ $options.i18n.steps.step4.help }}
</p>
<div class="gl-display-flex">
- <pre class="gl-w-full" data-testid="how-to-merge-instructions">{{ mergeInfo3 }}</pre>
+ <pre class="gl-w-full" data-testid="how-to-merge-instructions">{{ mergeInfo2 }}</pre>
<clipboard-button
- :text="mergeInfo3"
+ :text="mergeInfo2"
:title="$options.i18n.copyCommands"
class="gl-shadow-none! gl-bg-transparent! gl-flex-shrink-0"
/>
</div>
- <p v-if="reviewingDocsPath">
- <gl-sprintf data-testid="docs-tip" :message="$options.i18n.tip">
- <template #strong="{ content }">
- <strong>{{ content }}</strong>
- </template>
- <template #link="{ content }">
- <gl-link class="gl-display-inline-block" :href="reviewingDocsPath" target="_blank">{{
- content
- }}</gl-link>
- </template>
- </gl-sprintf>
- </p>
</gl-modal>
</template>