Skip to content

Commit c63f9b6

Browse files
author
maxime.c
committed
fix problem with catching different changelog formats
1 parent cc86e37 commit c63f9b6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

bin/v7_migration.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,8 +631,11 @@ def _update_changelog(self) -> bool:
631631
new_entry = f"| {next_version} | {current_date} | [TBD](https://github.com/airbytehq/airbyte/pull/TBD) | Update to CDK v7.0.0 |"
632632

633633
# Find the position to insert the new entry (after the table header)
634-
table_header_pattern = r"(\| Version \| Date.*?\n\| :--.*?\n)"
635-
match = re.search(table_header_pattern, content)
634+
# More flexible pattern to handle different table formats:
635+
# - Line starting with "|" containing "Version" (case insensitive)
636+
# - Followed by separator line starting with "|" containing dashes
637+
table_header_pattern = r"(\|.*?Version.*?\|.*?\n\|[\s\-:]+\|.*?\n)"
638+
match = re.search(table_header_pattern, content, re.IGNORECASE)
636639

637640
if not match:
638641
print(f"Could not find changelog table header in {changelog_file}")

0 commit comments

Comments
 (0)