Merge pull request #20087 from Homebrew/bump-formula-pr-body-fix

dev-cmd/bump-formula-pr: handle null body
This commit is contained in:
Mike McQuaid 2025-06-12 12:17:17 +00:00 committed by GitHub
commit d68b890d61
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -399,7 +399,7 @@ module Homebrew
nil nil
end end
if github_release_data.present? if github_release_data.present? && github_release_data["body"].present?
pre = "pre" if github_release_data["prerelease"].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. # 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) body = Formatter.truncate(github_release_data["body"], max: 32_768)