1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

sync_default_gems.rb: Expand GH-xxxx style GitHub links [ci skip]

This commit is contained in:
Nobuyoshi Nakada 2021-12-24 14:24:45 +09:00
parent 097c4a2adf
commit 083cf6a577
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -381,7 +381,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+\))/) {
print "[#{repo}] ", log.gsub(/\b(?i:fix) +\K#(?=\d+\b)|\(\K#(?=\d+\))|\bGH-(?=\d+\b)/) {
"#{url}/pull/"
}.gsub(%r{(?<![-\[\](){}\w@/])(?:(\w+(?:-\w+)*/\w+(?:-\w+)*)@)?(\h{10,40})\b}) {|c|
"https://github.com/#{$1 || repo}/commit/#{$2[0,12]}"