Commit b2334da4 authored by Douwe Maan's avatar Douwe Maan

Improve text in MR "How To Merge" modal.

parent b8590da0
...@@ -44,6 +44,7 @@ v 7.14.0 (unreleased) ...@@ -44,6 +44,7 @@ v 7.14.0 (unreleased)
- Remove satellites - Remove satellites
- Remove comments and email addresses when publicly exposing ssh keys (Zeger-Jan van de Weg) - Remove comments and email addresses when publicly exposing ssh keys (Zeger-Jan van de Weg)
- Improve MR merge widget text and UI consistency. - Improve MR merge widget text and UI consistency.
- Improve text in MR "How To Merge" modal.
v 7.13.3 v 7.13.3
- Fix bug causing Bitbucket importer to crash when OAuth application had been removed. - Fix bug causing Bitbucket importer to crash when OAuth application had been removed.
......
...@@ -3,42 +3,45 @@ ...@@ -3,42 +3,45 @@
.modal-content .modal-content
.modal-header .modal-header
%a.close{href: "#", "data-dismiss" => "modal"} × %a.close{href: "#", "data-dismiss" => "modal"} ×
%h3 How to merge %h3 Check out, review and merge locally
.modal-body .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 %p
%strong Step 1. %strong Step 1.
Fetch the code and create a new branch pointing to it Fetch and check out the branch for this merge request
%pre.dark %pre.dark
- if @merge_request.for_fork?
:preserve :preserve
git fetch #{@merge_request.source_project.http_url_to_repo} #{@merge_request.source_branch} 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 git checkout -b #{@merge_request.source_project_path}-#{@merge_request.source_branch} FETCH_HEAD
- else
:preserve
git fetch origin
git checkout -b #{@merge_request.source_branch} origin/#{@merge_request.source_branch}
%p %p
%strong Step 2. %strong Step 2.
Merge the branch and push the changes to GitLab Review the changes locally
%p
%strong Step 3.
Merge the branch and fix any conflicts that come up
%pre.dark %pre.dark
- if @merge_request.for_fork?
:preserve :preserve
git checkout #{@merge_request.target_branch} git checkout #{@merge_request.target_branch}
git merge --no-ff #{@merge_request.source_project_path}-#{@merge_request.source_branch} git merge --no-ff #{@merge_request.source_project_path}-#{@merge_request.source_branch}
git push origin #{@merge_request.target_branch}
- else - else
%p
%strong Step 1.
Update the repo and checkout the branch we are going to merge
%pre.dark
:preserve :preserve
git fetch origin git checkout #{@merge_request.target_branch}
git checkout -b #{@merge_request.source_branch} origin/#{@merge_request.source_branch} git merge --no-ff #{@merge_request.source_branch}
%p %p
%strong Step 2. %strong Step 4.
Merge the branch and push the changes to GitLab Push the result of the merge to GitLab
%pre.dark %pre.dark
:preserve :preserve
git checkout #{@merge_request.target_branch}
git merge --no-ff #{@merge_request.source_branch}
git push origin #{@merge_request.target_branch} 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 :javascript
$(function(){ $(function(){
......
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