Commit 745b07a9 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Document kind of tag that is created from the UI

When creating a tag from the UI without a message, we create a
lightweight tag, versus an annotated tag when a message was provided.

https://git-scm.com/book/en/v2/Git-Basics-Tagging
parent 88972e49
......@@ -28,4 +28,14 @@ module TagsHelper
def protected_tag?(project, tag)
ProtectedTag.protected?(project, tag.name)
end
def tag_description_help_text
text = s_('TagsPage|Optionally, add a message to the tag. Leaving this blank creates '\
'a %{link_start}lightweight tag.%{link_end}') % {
link_start: '<a href="https://git-scm.com/book/en/v2/Git-Basics-Tagging\" target="_blank" rel="noopener noreferrer">',
link_end: '</a>'
}
text.html_safe
end
end
......@@ -31,7 +31,7 @@
.col-sm-10
= text_area_tag :message, @message, required: false, class: 'form-control', rows: 5
.form-text.text-muted
= s_('TagsPage|Optionally, add a message to the tag.')
= tag_description_help_text
%hr
.form-group.row
= label_tag :release_description, s_('TagsPage|Release notes'), class: 'col-form-label col-sm-2'
......
......@@ -15676,7 +15676,7 @@ msgstr ""
msgid "TagsPage|New tag"
msgstr ""
msgid "TagsPage|Optionally, add a message to the tag."
msgid "TagsPage|Optionally, add a message to the tag. Leaving this blank creates a %{link_start}lightweight tag.%{link_end}"
msgstr ""
msgid "TagsPage|Optionally, add release notes to the tag. They will be stored in the GitLab database and displayed on the tags page."
......
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