WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit fce92b8

Browse files
Handle GH org for elastic_integration plugin (#18315) (#18317)
Previously the RN generator would look for EVERY plugin in the `logstash-plugins` GH org. The elastic integration plugin is in the `elastic` org. Update the logic to handle this. (cherry picked from commit fc7ba9f) Co-authored-by: Cas Donoghue <[email protected]>
1 parent 8b4da50 commit fce92b8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/release/generate_release_notes_md.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,17 @@
9191
plugin_changes.each do |plugin, versions|
9292
_, type, name = plugin.split("-")
9393
header = "**#{name.capitalize} #{type.capitalize} - #{versions.last}**"
94+
# Determine the correct GitHub organization
95+
org = plugin.include?('elastic_integration') ? 'elastic' : 'logstash-plugins'
9496
start_changelog_file = Tempfile.new(plugin + 'start')
9597
end_changelog_file = Tempfile.new(plugin + 'end')
96-
changelog = `curl https://raw.githubusercontent.com/logstash-plugins/#{plugin}/v#{versions.last}/CHANGELOG.md`.split("\n")
98+
changelog = `curl https://raw.githubusercontent.com/#{org}/#{plugin}/v#{versions.last}/CHANGELOG.md`.split("\n")
9799
report << "#{header}\n"
98100
changelog.each do |line|
99101
break if line.match(/^## #{versions.first}/)
100102
next if line.match(/^##/)
101103
line.gsub!(/^\+/, "")
102-
line.gsub!(/ #(?<number>\d+)\s*$/, " https://github.com/logstash-plugins/#{plugin}/issues/\\k<number>[#\\k<number>]")
104+
line.gsub!(/ #(?<number>\d+)\s*$/, " https://github.com/#{org}/#{plugin}/issues/\\k<number>[#\\k<number>]")
103105
line.gsub!(/\[#(?<number>\d+)\]\((?<url>[^)]*)\)/, "[#\\k<number>](\\k<url>)")
104106
line.gsub!(/^\s+-/, "*")
105107
report << line

0 commit comments

Comments
 (0)