diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-12-06 14:18:01 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-12-06 14:18:01 +0900 |
commit | e563c6068eed526e7eb9bc4d3606501c827da674 (patch) | |
tree | f045d55c16792e3a86451c86c1da9bb7854f6d04 /tool | |
parent | c2192cb985c10c90ba5e4d64652f79f89afff983 (diff) |
sync_default_gems.rb: convert commit hashes to github URLs [ci skip]
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/sync_default_gems.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index 4ed0785e47..9557458007 100755 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -380,6 +380,8 @@ def message_filter(repo, sha) url = "https://github.com/#{repo}" print "[#{repo}] ", log.gsub(/fix +#\d+|\(#\d+\)/i) { $&.sub(/#/) {"#{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)/) { "\n\n" "#{url}/commit/#{sha[0,10]}\n" } |