Skip to content

Commit e667bb7

Browse files
committed
Add skip log-fix command to skip that commit totally [ci skip]
1 parent 3ca007d commit e667bb7

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tool/lib/vcs.rb

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -522,17 +522,20 @@ def changelog_formatter(path, arg, base_url = nil)
522522
cmd << date
523523
cmd.concat(arg)
524524
proc do |w|
525-
w.print "-*- coding: utf-8 -*-\n\n"
526-
w.print "base-url = #{base_url}\n\n" if base_url
525+
w.print "-*- coding: utf-8 -*-\n"
526+
w.print "\n""base-url = #{base_url}\n" if base_url
527527
cmd_pipe(env, cmd, chdir: @srcdir) do |r|
528-
while s = r.gets("\ncommit ")
528+
r.gets(sep = "commit ")
529+
sep = "\n" + sep
530+
while s = r.gets(sep, chomp: true)
529531
h, s = s.split(/^$/, 2)
530532

531533
next if /^Author: *dependabot\[bot\]/ =~ h
532534

533535
h.gsub!(/^(?:(?:Author|Commit)(?:Date)?|Date): /, ' \&')
534536
if s.sub!(/\nNotes \(log-fix\):\n((?: +.*\n)+)/, '')
535537
fix = $1
538+
next if /\A *skip\Z/ =~ fix
536539
s = s.lines
537540
fix.each_line do |x|
538541
next unless x.sub!(/^(\s+)(?:(\d+)|\$(?:-\d+)?)/, '')
@@ -598,7 +601,7 @@ def changelog_formatter(path, arg, base_url = nil)
598601

599602
s.gsub!(/ +\n/, "\n")
600603
s.sub!(/^Notes:/, ' \&')
601-
w.print h, s
604+
w.print sep, h, s
602605
end
603606
end
604607
end

0 commit comments

Comments
 (0)