diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /app/assets/javascripts/vue_merge_request_widget/components/mr_widget_how_to_merge_modal.vue | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) | |
download | gitlab-ce-05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2.tar.gz |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
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.vue | 58 |
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> |