Commit 12a773b6 authored by Alain Takoudjou's avatar Alain Takoudjou

fixup! NXD Teach GitLab about patches: include merge description message

Include Merge description message in apply_patches and merge as topic by default. User can disable description in merge message by clicking on `Don't include description in commit message`.

/reviewed-on !4
parent 611cf13b
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
rows: 14, hint: true rows: 14, hint: true
= hidden_field_tag :merge_when_build_succeeds, "", autocomplete: "off" = hidden_field_tag :merge_when_build_succeeds, "", autocomplete: "off"
= hidden_field_tag :apply_patches, ""
:javascript :javascript
$('.accept_merge_request_apply').on('click', function() { $('.accept_merge_request_apply').on('click', function() {
...@@ -68,8 +69,8 @@ ...@@ -68,8 +69,8 @@
$('.js-apply-button').html("<i class='fa fa-spinner fa-spin'></i> Apply in progress"); $('.js-apply-button').html("<i class='fa fa-spinner fa-spin'></i> Apply in progress");
}); });
//$('.accept_merge_request_merge').on('click', function() { $('.accept_merge_request_merge').on('click', function() {
// $("#apply_patches").val("off"); $("#apply_patches").val("off");
// $('.js-merge-button').html("<i class='fa fa-spinner fa-spin'></i> Merge in progress"); $('.js-merge-button').html("<i class='fa fa-spinner fa-spin'></i> Merge in progress");
//}); });
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
.commit-message-container .commit-message-container
.max-width-marker .max-width-marker
= text_area_tag 'commit_message', = text_area_tag 'commit_message',
(params[:commit_message] || local_assigns[:text] || local_assigns[:placeholder]), (local_assigns[:message_with_description] || params[:commit_message] || local_assigns[:text] || local_assigns[:placeholder]),
class: 'form-control js-commit-message', placeholder: local_assigns[:placeholder], class: 'form-control js-commit-message', placeholder: local_assigns[:placeholder],
data: descriptions, data: descriptions,
required: true, rows: (local_assigns[:rows] || 3), required: true, rows: (local_assigns[:rows] || 3),
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
Try to keep the first line under 52 characters Try to keep the first line under 52 characters
and the others under 72. and the others under 72.
- if descriptions.present? - if descriptions.present?
%p.hint.js-with-description-hint %p.hint.js-with-description-hint.hide
= link_to "#", class: "js-with-description-link" do = link_to "#", class: "js-with-description-link" do
Include description in commit message Include description in commit message
%p.hint.js-without-description-hint.hide %p.hint.js-without-description-hint
= link_to "#", class: "js-without-description-link" do = link_to "#", class: "js-without-description-link" do
Don't include description in commit message Don't include description in commit message
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