summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG1
-rw-r--r--app/views/projects/merge_requests/show/_how_to_merge.html.haml55
2 files changed, 30 insertions, 26 deletions
diff --git a/CHANGELOG b/CHANGELOG
index fe08c8e2bc0..2f552a441cb 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -44,6 +44,7 @@ v 7.14.0 (unreleased)
- Remove satellites
- Remove comments and email addresses when publicly exposing ssh keys (Zeger-Jan van de Weg)
- Improve MR merge widget text and UI consistency.
+ - Improve text in MR "How To Merge" modal.
v 7.13.3
- Fix bug causing Bitbucket importer to crash when OAuth application had been removed.
diff --git a/app/views/projects/merge_requests/show/_how_to_merge.html.haml b/app/views/projects/merge_requests/show/_how_to_merge.html.haml
index 22f601ac99e..db1575f899a 100644
--- a/app/views/projects/merge_requests/show/_how_to_merge.html.haml
+++ b/app/views/projects/merge_requests/show/_how_to_merge.html.haml
@@ -3,42 +3,45 @@
.modal-content
.modal-header
%a.close{href: "#", "data-dismiss" => "modal"} ×
- %h3 How to merge
+ %h3 Check out, review and merge locally
.modal-body
- - if @merge_request.for_fork?
- - source_remote = @merge_request.source_project.namespace.nil? ? "source" :@merge_request.source_project.namespace.path
- - target_remote = @merge_request.target_project.namespace.nil? ? "target" :@merge_request.target_project.namespace.path
- %p
- %strong Step 1.
- Fetch the code and create a new branch pointing to it
- %pre.dark
+ %p
+ %strong Step 1.
+ Fetch and check out the branch for this merge request
+ %pre.dark
+ - if @merge_request.for_fork?
:preserve
git fetch #{@merge_request.source_project.http_url_to_repo} #{@merge_request.source_branch}
git checkout -b #{@merge_request.source_project_path}-#{@merge_request.source_branch} FETCH_HEAD
- %p
- %strong Step 2.
- Merge the branch and push the changes to GitLab
- %pre.dark
- :preserve
- git checkout #{@merge_request.target_branch}
- git merge --no-ff #{@merge_request.source_project_path}-#{@merge_request.source_branch}
- git push origin #{@merge_request.target_branch}
- - else
- %p
- %strong Step 1.
- Update the repo and checkout the branch we are going to merge
- %pre.dark
+ - else
:preserve
git fetch origin
git checkout -b #{@merge_request.source_branch} origin/#{@merge_request.source_branch}
- %p
- %strong Step 2.
- Merge the branch and push the changes to GitLab
- %pre.dark
+ %p
+ %strong Step 2.
+ Review the changes locally
+
+ %p
+ %strong Step 3.
+ Merge the branch and fix any conflicts that come up
+ %pre.dark
+ - if @merge_request.for_fork?
+ :preserve
+ git checkout #{@merge_request.target_branch}
+ git merge --no-ff #{@merge_request.source_project_path}-#{@merge_request.source_branch}
+ - else
:preserve
git checkout #{@merge_request.target_branch}
git merge --no-ff #{@merge_request.source_branch}
- git push origin #{@merge_request.target_branch}
+ %p
+ %strong Step 4.
+ Push the result of the merge to GitLab
+ %pre.dark
+ :preserve
+ git push origin #{@merge_request.target_branch}
+ - unless @merge_request.can_be_merged_by?(current_user)
+ %p
+ Note that pushing to GitLab requires write access to this repository.
:javascript
$(function(){