Skip to content

Commit

Permalink
rename regex for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
nickfyson committed Dec 15, 2023
1 parent ee53012 commit fda1796
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/update-release-branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def process_changelog_for_backports(source_branch_major_version, target_branch_m

# changelog entries can use the following format to indicate
# that they only apply to newer versions
regex = re.compile(r'\[v(\d+)\+ only\]')
some_versions_only_regex = re.compile(r'\[v(\d+)\+ only\]')

output = ''

Expand All @@ -205,7 +205,7 @@ def process_changelog_for_backports(source_branch_major_version, target_branch_m
line = line.rstrip()

# filter out changenote entries that apply only to newer versions
match = regex.search(line)
match = some_versions_only_regex.search(line)
if match:
if int(target_branch_major_version) < int(match.group(1)):
continue
Expand Down

0 comments on commit fda1796

Please sign in to comment.