mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
dev-cmd/bump-formula-pr: release notes as proper html link
The release notes link is not rendered as a proper hyperlink, this fixes it. Few examples of PRs with unclickable links: * https://github.com/Homebrew/homebrew-core/pull/228256 * https://github.com/Homebrew/homebrew-core/pull/228263 * https://github.com/Homebrew/homebrew-core/pull/228267
This commit is contained in:
parent
a83a71ab5f
commit
5627a90652
@ -404,11 +404,14 @@ module Homebrew
|
||||
# maximum length of PR body is 65,536 characters so let's truncate release notes to half of that.
|
||||
body = Formatter.truncate(github_release_data["body"], max: 32_768)
|
||||
|
||||
# Ensure the URL is properly HTML encoded to handle any quotes or other special characters
|
||||
html_url = CGI.escapeHTML(github_release_data["html_url"])
|
||||
|
||||
formula_pr_message += <<~XML
|
||||
<details>
|
||||
<summary>#{pre}release notes</summary>
|
||||
<pre>#{body}</pre>
|
||||
<p>View the full release notes at #{github_release_data["html_url"]}.</p>
|
||||
<p>View the full release notes at <a href="#{html_url}">#{html_url}</a>.</p>
|
||||
</details>
|
||||
XML
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user