redmine-backporter.rb: Prepend commit: to shorter revs

Some of the places in Redmine (e.g. Associated revisions) print
revisions using only 8 characters. Even when I copied a revision from
there, I want to prepend commit: in the message.
This commit is contained in:
Takashi Kokubun 2024-06-11 11:28:03 -07:00
parent ec1ea2c5b9
commit 0a6b1a4d9d

View File

@ -358,7 +358,7 @@ eom
str = log[/merge revision\(s\) ([^:]+)(?=:)/]
if str
str.sub!(/\Amerge/, 'merged')
str.gsub!(/\h{40}/, 'commit:\0')
str.gsub!(/\h{8,40}/, 'commit:\0')
str = "ruby_#{TARGET_VERSION.tr('.','_')} commit:#{rev} #{str}."
else
str = "ruby_#{TARGET_VERSION.tr('.','_')} commit:#{rev}."