Skip to content

Commit d854e0f

Browse files
authored
Extract release notes lines to an array to later join it (#644)
2 parents d2fd5d0 + 64a3175 commit d854e0f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ _None_
1414

1515
### Bug Fixes
1616

17-
_None_
17+
- Fix error in `extract_release_notes_for_version`, avoiding modifying a frozen string. [#644]
1818

1919
### Internal Changes
2020

lib/fastlane/plugin/wpmreleasetoolkit/actions/common/extract_release_notes_for_version_action.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ def self.run(params)
1010
release_notes_file_path = params[:release_notes_file_path]
1111
extracted_notes_file_path = params[:extracted_notes_file_path]
1212

13-
extracted_notes = ''
13+
extracted_lines = []
1414
extract_notes(release_notes_file_path, version) do |line|
15-
extracted_notes += line
15+
extracted_lines << line
1616
end
17-
extracted_notes.chomp!('') # Remove any extra empty line(s) at the end
17+
extracted_notes = extracted_lines.join.chomp('') # Combine lines and remove any extra empty line(s) at the end
1818

1919
unless extracted_notes_file_path.nil? || extracted_notes_file_path.empty?
2020
File.write(extracted_notes_file_path, extracted_notes)

0 commit comments

Comments
 (0)