INNER CODE UNIT · Python
parse_changelog
Teycir/BurpAPISecuritySuite · scripts/sync_readme_updates.py:30
def parse_changelog(changelog_text: str, max_releases: int) -> List[Release]:
lines = changelog_text.splitlines()
releases: List[Release] = []
i = 0
while i < len(lines) and len(releases) < max_releases:
match = VERSION_RE.match(lines[i])
if not match:
i += 1
continue
version = match.group("version")
date = match.group("date")
i += 1
current_section = ""
bullets: List[str] = []
while i < len(lines):