diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-09-04 00:26:39 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-09-04 00:26:39 +0900 |
commit | 3a145066a6d51cf622a9cd77d7f0942d7313fdc3 (patch) | |
tree | bb7e330ada3f5d2c50a8ef4d0bf1eb562c85f552 /tool/lib/vcs.rb | |
parent | af68112a1b8512c8d5c9823f0f71db8df1c0c6b1 (diff) | |
download | ruby-3a145066a6d51cf622a9cd77d7f0942d7313fdc3.tar.gz |
Expand upstream issue numbers to URLs in ChangeLog
Diffstat (limited to 'tool/lib/vcs.rb')
-rw-r--r-- | tool/lib/vcs.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tool/lib/vcs.rb b/tool/lib/vcs.rb index 1ccf80a49f..c41276e3b4 100644 --- a/tool/lib/vcs.rb +++ b/tool/lib/vcs.rb @@ -625,6 +625,12 @@ class VCS end s = s.join('') end + + 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} + end + s.gsub!(/ +\n/, "\n") s.sub!(/^Notes:/, ' \&') w.print h, s |