Skip to content

Commit

Permalink
Don't send a PR for arch migrations if build_platform is in conda-for…
Browse files Browse the repository at this point in the history
…ge.yml
  • Loading branch information
isuruf committed Jun 27, 2024
1 parent 18f951f commit d9ce7e9
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions conda_forge_tick/migrators/arch.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,17 +180,17 @@ def __init__(
def filter(self, attrs: "AttrsTypedDict", not_bad_str_start: str = "") -> bool:
if super().filter(attrs):
return True
muid = frozen_to_json_friendly(self.migrator_uid(attrs))
for arch in self.arches:
configured_arch = (
attrs.get("conda-forge.yml", {}).get("provider", {}).get(arch)
) or (
attrs.get("conda-forge.yml", {}).get("build_platform", {}).get(arch) not in [None, arch]
)
if configured_arch:
return muid in _sanitized_muids(
attrs.get("pr_info", {}).get("PRed", []),
)
else:
return False
if not configured_arch:
# This arch is not in provider or build_platform
return False

return True

def migrate(
self, recipe_dir: str, attrs: "AttrsTypedDict", **kwargs: Any
Expand Down Expand Up @@ -347,17 +347,17 @@ def __init__(
def filter(self, attrs: "AttrsTypedDict", not_bad_str_start: str = "") -> bool:
if super().filter(attrs):
return True
muid = frozen_to_json_friendly(self.migrator_uid(attrs))
for arch in self.arches:
configured_arch = (
attrs.get("conda-forge.yml", {}).get("provider", {}).get(arch)
) or (
attrs.get("conda-forge.yml", {}).get("build_platform", {}).get(arch) not in [None, arch]
)
if configured_arch:
return muid in _sanitized_muids(
attrs.get("pr_info", {}).get("PRed", []),
)
else:
return False
if not configured_arch:
# This arch is not in provider or build_platform
return False

return True

def migrate(
self, recipe_dir: str, attrs: "AttrsTypedDict", **kwargs: Any
Expand Down

0 comments on commit d9ce7e9

Please sign in to comment.