From 63cdd0723ca05e8c34ede4d11fb78b827ecb4b34 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Wed, 21 May 2025 12:45:47 +0000 Subject: [PATCH] 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. --- Library/Homebrew/dev-cmd/bump-formula-pr.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb index 3d7b867ee4..adfb59ab07 100644 --- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb +++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb @@ -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
#{pre}release notes -
#{github_release_data["body"]}
+
#{body}
+

View the full release notes at #{github_release_data["html_url"]}.

XML end