mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Replace "Fixes"/"Fixed" in commit logs as well as vcs.rb [ci skip]
Use the same regexp to replace "(#NNNN)" and "GH-NNNN" style references in vcs.rb, too.
This commit is contained in:
parent
f863bc505c
commit
c28a4e0340
2 changed files with 2 additions and 2 deletions
|
@ -659,7 +659,7 @@ class VCS
|
|||
|
||||
if %r[^ +(https://github\.com/[^/]+/[^/]+/)commit/\h+\n(?=(?: +\n(?i: +Co-authored-by: .*\n)+)?(?:\n|\Z))] =~ s
|
||||
issue = "#{$1}pull/"
|
||||
s.gsub!(/\b[Ff]ix(?:e[sd])? \K#(?=\d+)/) {issue}
|
||||
s.gsub!(/\b(?:(?i:fix(?:e[sd])?) +|GH-)\K#(?=\d+\b)|\(\K#(?=\d+\))/) {issue}
|
||||
end
|
||||
|
||||
s.gsub!(/ +\n/, "\n")
|
||||
|
|
|
@ -397,7 +397,7 @@ def message_filter(repo, sha)
|
|||
log = STDIN.read
|
||||
log.delete!("\r")
|
||||
url = "https://github.com/#{repo}"
|
||||
print "[#{repo}] ", log.gsub(/\b(?i:fix) +\K#(?=\d+\b)|\(\K#(?=\d+\))|\bGH-(?=\d+\b)/) {
|
||||
print "[#{repo}] ", log.gsub(/\b(?:(?i:fix(?:e[sd])?) +|GH-)\K#(?=\d+\b)|\(\K#(?=\d+\))/) {
|
||||
"#{url}/pull/"
|
||||
}.gsub(%r{(?<![-\[\](){}\w@/])(?:(\w+(?:-\w+)*/\w+(?:-\w+)*)@)?(\h{10,40})\b}) {|c|
|
||||
"https://github.com/#{$1 || repo}/commit/#{$2[0,12]}"
|
||||
|
|
Loading…
Reference in a new issue