Skip to content

Commit

Permalink
Fix regex patterns for cleaning repo names
Browse files Browse the repository at this point in the history
  • Loading branch information
anfimovdm committed Oct 31, 2024
1 parent 4734a0b commit 048bde9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions alws/release_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ def __init__(self, db: AsyncSession):
self.base_platform = None
self.clean_base_dist_name_lower = None
self.repo_name_regex = re.compile(
r"\w+-\d-(beta-|)(?P<name>\w+(-\w+)?)"
r"\w+-(\w+-|)+\d+-(beta-|)(?P<name>\w+(-\w+)?)",
)
self._beholder_client = BeholderClient(settings.beholder_host)

Expand Down Expand Up @@ -1179,7 +1179,11 @@ def generate_key(pkg_arch: str) -> BeholderKey:
prev_pkg = beholder_cache.get(key, {})
if pkg_repos:
for repo in pkg['repositories']:
repo['name'] = re.sub(r'^\w+-\d-(beta-|)', '', repo['name'])
repo['name'] = re.sub(
r'^\w+-(\w+-|)+\d+-(beta-|)',
'',
repo['name'],
)
repo['priority'] = priority
pkg['repositories'].extend([
repo
Expand Down

0 comments on commit 048bde9

Please sign in to comment.