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? %p
- source_remote = @merge_request.source_project.namespace.nil? ? "source" :@merge_request.source_project.namespace.path %strong Step 1.
- target_remote = @merge_request.target_project.namespace.nil? ? "target" :@merge_request.target_project.namespace.path Fetch and check out the branch for this merge request
%p %pre.dark
%strong Step 1. - if @merge_request.for_fork?
Fetch the code and create a new branch pointing to it
%pre.dark
: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
%p - else
%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
:preserve :preserve
git fetch origin git fetch origin
git checkout -b #{@merge_request.source_branch} origin/#{@merge_request.source_branch} 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
%pre.dark
%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 :preserve
git checkout #{@merge_request.target_branch} git checkout #{@merge_request.target_branch}
git merge --no-ff #{@merge_request.source_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 :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