mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
sync_default_gems.rb: GitHub links at word boundary only [ci skip]
This commit is contained in:
parent
3a59abab08
commit
097c4a2adf
1 changed files with 2 additions and 2 deletions
|
@ -381,8 +381,8 @@ def message_filter(repo, sha)
|
|||
log = STDIN.read
|
||||
log.delete!("\r")
|
||||
url = "https://github.com/#{repo}"
|
||||
print "[#{repo}] ", log.gsub(/fix +#\d+|\(#\d+\)/i) {
|
||||
$&.sub(/#/) {"#{url}/pull/"}
|
||||
print "[#{repo}] ", log.gsub(/\b(?i:fix) +\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]}"
|
||||
}.sub(/\s*(?=(?i:\nCo-authored-by:.*)*\Z)/) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue