diff --git a/conda_forge_tick/contexts.py b/conda_forge_tick/contexts.py index f08bb0272..91d519b4d 100644 --- a/conda_forge_tick/contexts.py +++ b/conda_forge_tick/contexts.py @@ -108,6 +108,7 @@ class FeedstockContext: package_name: str feedstock_name: str attrs: "AttrsTypedDict" + passed_dep_analysis = True _default_branch: str = None @property diff --git a/conda_forge_tick/migrators/version.py b/conda_forge_tick/migrators/version.py index 3f8816e83..7f169ea15 100644 --- a/conda_forge_tick/migrators/version.py +++ b/conda_forge_tick/migrators/version.py @@ -283,6 +283,7 @@ def pr_body(self, feedstock_ctx: FeedstockContext) -> str: ), ) ) + # Statement here template = ( "|{name}|{new_version}|[![Anaconda-Server Badge]" @@ -337,6 +338,18 @@ def _hint_and_maybe_update_deps(self, feedstock_ctx): self.python_nodes, "new_version", ) + + if feedstock_ctx.attrs.get("conda-forge.yml", {}).get( + "bot", + {}, + ).get("automerge", False) in {"version", True}: + feedstock_ctx.passed_dep_analysis = False + hint += ( + "\nNote that automerge has been disabled for this PR because of the dependency issues. You can" + "restore automerge by disabling this feature by adding `bot: inspection: false` to your " + "`conda-forge.yml`. " + ) + except (BaseException, Exception): hint = "\n\nDependency Analysis\n--------------------\n\n" hint += ( @@ -354,10 +367,12 @@ def commit_message(self, feedstock_ctx: FeedstockContext) -> str: def pr_title(self, feedstock_ctx: FeedstockContext) -> str: assert isinstance(feedstock_ctx.attrs["version_pr_info"]["new_version"], str) # TODO: turn False to True when we default to automerge - if feedstock_ctx.attrs.get("conda-forge.yml", {}).get("bot", {}).get( - "automerge", - False, - ) in {"version", True}: + if ( + feedstock_ctx.attrs.get("conda-forge.yml", {}) + .get("bot", {}) + .get("automerge", False) + in {"version", True} + ) and feedstock_ctx.passed_dep_analysis: add_slug = "[bot-automerge] " else: add_slug = ""