Skip to content

Commit a9633b8

Browse files
graycreateclaude
andcommitted
fix: correct character limit calculation in changelog truncation
Address Copilot review feedback to properly account for the extra message length when truncating long changelogs. Changes: - Extract extra_message into a variable for accurate length calculation - Calculate max_length by subtracting both feedback_link and extra_message lengths from 4000 limit - Ensures total output never exceeds TestFlight's 4000 character limit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent b8b014d commit a9633b8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fastlane/changelog_helper.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,9 @@ def self.format_for_testflight(content)
9494

9595
# Ensure we don't exceed TestFlight's changelog length limit (4000 chars)
9696
if (formatted + feedback_link).length > 4000
97-
max_length = 3900 - feedback_link.length
98-
formatted = formatted[0...max_length] + "\n\n(See full changelog at github.com/v2er-app/iOS)"
97+
extra_message = "\n\n(See full changelog at github.com/v2er-app/iOS)"
98+
max_length = 4000 - feedback_link.length - extra_message.length
99+
formatted = formatted[0...max_length] + extra_message
99100
end
100101

101102
formatted + feedback_link

0 commit comments

Comments
 (0)