Skip to content

Commit d9ce7e9

Browse files
committed
Don't send a PR for arch migrations if build_platform is in conda-forge.yml
1 parent 18f951f commit d9ce7e9

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

conda_forge_tick/migrators/arch.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -180,17 +180,17 @@ def __init__(
180180
def filter(self, attrs: "AttrsTypedDict", not_bad_str_start: str = "") -> bool:
181181
if super().filter(attrs):
182182
return True
183-
muid = frozen_to_json_friendly(self.migrator_uid(attrs))
184183
for arch in self.arches:
185184
configured_arch = (
186185
attrs.get("conda-forge.yml", {}).get("provider", {}).get(arch)
186+
) or (
187+
attrs.get("conda-forge.yml", {}).get("build_platform", {}).get(arch) not in [None, arch]
187188
)
188-
if configured_arch:
189-
return muid in _sanitized_muids(
190-
attrs.get("pr_info", {}).get("PRed", []),
191-
)
192-
else:
193-
return False
189+
if not configured_arch:
190+
# This arch is not in provider or build_platform
191+
return False
192+
193+
return True
194194

195195
def migrate(
196196
self, recipe_dir: str, attrs: "AttrsTypedDict", **kwargs: Any
@@ -347,17 +347,17 @@ def __init__(
347347
def filter(self, attrs: "AttrsTypedDict", not_bad_str_start: str = "") -> bool:
348348
if super().filter(attrs):
349349
return True
350-
muid = frozen_to_json_friendly(self.migrator_uid(attrs))
351350
for arch in self.arches:
352351
configured_arch = (
353352
attrs.get("conda-forge.yml", {}).get("provider", {}).get(arch)
353+
) or (
354+
attrs.get("conda-forge.yml", {}).get("build_platform", {}).get(arch) not in [None, arch]
354355
)
355-
if configured_arch:
356-
return muid in _sanitized_muids(
357-
attrs.get("pr_info", {}).get("PRed", []),
358-
)
359-
else:
360-
return False
356+
if not configured_arch:
357+
# This arch is not in provider or build_platform
358+
return False
359+
360+
return True
361361

362362
def migrate(
363363
self, recipe_dir: str, attrs: "AttrsTypedDict", **kwargs: Any

0 commit comments

Comments
 (0)