mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Truncate long release notes in formula PR descriptions
- Some formula bumps have really long release notes which causes their bump PRs to exceed GitHub's 65k character limit for issue bodies.
This commit is contained in:
parent
8b32d019d4
commit
63cdd0723c
@ -399,10 +399,14 @@ module Homebrew
|
||||
|
||||
if github_release_data.present?
|
||||
pre = "pre" if github_release_data["prerelease"].present?
|
||||
# maximum length of PR body is 65,536 characters so let's truncate release notes to half of that.
|
||||
body = github_release_data["body"].truncate(32_768)
|
||||
|
||||
formula_pr_message += <<~XML
|
||||
<details>
|
||||
<summary>#{pre}release notes</summary>
|
||||
<pre>#{github_release_data["body"]}</pre>
|
||||
<pre>#{body}</pre>
|
||||
<p>View the full release notes at #{github_release_data["html_url"]}.</p>
|
||||
</details>
|
||||
XML
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user