Skip to content

Commit bb66be4

Browse files
committed
check for breaking changes as headers
1 parent 1c7bdf3 commit bb66be4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

scripts/find_breaking_changes.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,10 @@ def get_releases_with_breaking_changes(repo, current_version, new_version):
4949
release_version
5050
) <= version.parse(new_version):
5151

52-
# Check if release notes mention breaking changes
53-
body = release.get("body", "").lower()
54-
if any(
55-
keyword in body for keyword in ["breaking change", "breaking changes", "breaking:", "breaking"]
56-
):
52+
# Check if release notes have breaking changes as headers
53+
body = release.get("body", "")
54+
breaking_header_pattern = r'^#+.*breaking changes'
55+
if re.search(breaking_header_pattern, body, re.IGNORECASE | re.MULTILINE):
5756
breaking_releases.append(
5857
{
5958
"version": release_version,

0 commit comments

Comments
 (0)