summaryrefslogtreecommitdiff
path: root/tool/sync_default_gems.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-07-13 19:05:50 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-07-13 19:05:50 +0900
commitf9c559a0a2892d131e7d16c72d6ebd61f3cde208 (patch)
tree09198714158faffdd51253e993c9864cded4191c /tool/sync_default_gems.rb
parent5fd5d71a4b100fdeca55352a5441b095a1d82e16 (diff)
sync_default_gems.rb: expand links to PRs of the upstream
Diffstat (limited to 'tool/sync_default_gems.rb')
-rw-r--r--tool/sync_default_gems.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb
index 5ef672b35b..c8fc83a4aa 100644
--- a/tool/sync_default_gems.rb
+++ b/tool/sync_default_gems.rb
@@ -333,8 +333,11 @@ IGNORE_FILE_PATTERN =
def message_filter(repo, sha)
log = STDIN.read
- print "[#{repo}] ", log.sub(/\s*(?=(?i:\nCo-authored-by:.*)*\Z)/) {
- "\n\n" "https://github.com/#{repo}/commit/#{sha[0,10]}\n"
+ url = "https://github.com/#{repo}"
+ print "[#{repo}] ", log.gsub(/fix +#\d+|\(#\d+\)/i) {
+ $&.sub(/#/) {"#{url}/pull/"}
+ }.sub(/\s*(?=(?i:\nCo-authored-by:.*)*\Z)/) {
+ "\n\n" "#{url}/commit/#{sha[0,10]}\n"
}
end