summaryrefslogtreecommitdiff
path: root/app/views/shared
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2016-12-17 02:06:16 +0000
committerSean McGivern <sean@mcgivern.me.uk>2016-12-17 02:06:16 +0000
commit0a6450094eb13702f6f6f03e468db4fc8f023315 (patch)
tree687b3e07d0c2140725f6c8a138acceffd180a8c3 /app/views/shared
parent8f5cf205d221ff43b04e3a0c2ad696914b387ae8 (diff)
parent3e3d6b53dcdc50bbe45c4b3ff43faf3d2728f72c (diff)
downloadgitlab-ce-0a6450094eb13702f6f6f03e468db4fc8f023315.tar.gz
Merge branch 'cleaner-merge-commit-messages' into 'master'
Cleaner merge commit messages Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/23462 See merge request !7722
Diffstat (limited to 'app/views/shared')
-rw-r--r--app/views/shared/_commit_message_container.html.haml9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/views/shared/_commit_message_container.html.haml b/app/views/shared/_commit_message_container.html.haml
index 0a38327baa2..c196bc06b17 100644
--- a/app/views/shared/_commit_message_container.html.haml
+++ b/app/views/shared/_commit_message_container.html.haml
@@ -1,5 +1,6 @@
.form-group.commit_message-group
- nonce = SecureRandom.hex
+ - descriptions = local_assigns.slice(:message_with_description, :message_without_description)
= label_tag "commit_message-#{nonce}", class: 'control-label' do
Commit message
.col-sm-10
@@ -8,9 +9,17 @@
= text_area_tag 'commit_message',
(params[:commit_message] || local_assigns[:text] || local_assigns[:placeholder]),
class: 'form-control js-commit-message', placeholder: local_assigns[:placeholder],
+ data: descriptions,
required: true, rows: (local_assigns[:rows] || 3),
id: "commit_message-#{nonce}"
- if local_assigns[:hint]
%p.hint
Try to keep the first line under 52 characters
and the others under 72.
+ - if descriptions.present?
+ %p.hint.js-with-description-hint
+ = link_to "#", class: "js-with-description-link" do
+ Include description in commit message
+ %p.hint.js-without-description-hint.hide
+ = link_to "#", class: "js-without-description-link" do
+ Don't include description in commit message