Skip to content

Commit

Permalink
fix handling of backport changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
nickfyson committed Apr 15, 2024
1 parent 2b2cee5 commit f2c09fb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/update-release-branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,18 @@ def process_changelog_for_backports(source_branch_major_version, target_branch_m

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

output += line
if line.startswith('## '):
line = line.replace(f'## {source_branch_major_version}', f'## {target_branch_major_version}')
# we have found the first section, so now handle things differently
found_first_section = True

output += line
if found_first_section:
# we now handle things differently
break

# found_content tracks whether we hit two headings in a row
Expand Down

0 comments on commit f2c09fb

Please sign in to comment.