Skip to content

Commit f2c09fb

Browse files
authored
fix handling of backport changelog
1 parent 2b2cee5 commit f2c09fb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/update-release-branch.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,18 @@ def process_changelog_for_backports(source_branch_major_version, target_branch_m
187187

188188
# until we find the first section, just duplicate all lines
189189
while True:
190+
found_first_section = False
190191
line = f.readline()
191192
if not line:
192193
raise Exception('Could not find any change sections in CHANGELOG.md') # EOF
193194

194-
output += line
195195
if line.startswith('## '):
196196
line = line.replace(f'## {source_branch_major_version}', f'## {target_branch_major_version}')
197-
# we have found the first section, so now handle things differently
197+
found_first_section = True
198+
199+
output += line
200+
if found_first_section:
201+
# we now handle things differently
198202
break
199203

200204
# found_content tracks whether we hit two headings in a row

0 commit comments

Comments
 (0)