File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed
lib/create_github_release Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -292,15 +292,28 @@ def body
292292 #
293293 def to_s
294294 String . new . tap do |changelog |
295- changelog << "#{ front_matter } \n \n " unless front_matter . empty?
296- changelog << release_header
297- changelog << release_description
298- changelog << "\n #{ body } \n " unless body . empty?
295+ changelog << formatted_front_matter unless front_matter . empty?
296+ changelog << release_header << release_description
297+ changelog << formatted_body unless body . empty?
299298 end
300299 end
301300
302301 private
303302
303+ # The front matter formatted to insert into the changelog
304+ # @return [String] The front matter formatted to insert into the changelog
305+ # @api private
306+ def formatted_front_matter
307+ "#{ front_matter } \n \n "
308+ end
309+
310+ # The body formatted to insert into the changelog
311+ # @return [String] The body formatted to insert into the changelog
312+ # @api private
313+ def formatted_body
314+ "\n #{ body } \n "
315+ end
316+
304317 # The index of the line in @lines where the front matter begins
305318 # @return [Integer] The index of the line in @lines where the front matter begins
306319 # @api private
You can’t perform that action at this time.
0 commit comments