Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions conda_forge_tick/contexts.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ class FeedstockContext:
package_name: str
feedstock_name: str
attrs: "AttrsTypedDict"
passed_dep_analysis = True
_default_branch: str = None

@property
Expand Down
23 changes: 19 additions & 4 deletions conda_forge_tick/migrators/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ def pr_body(self, feedstock_ctx: FeedstockContext) -> str:
),
)
)

# Statement here
template = (
"|{name}|{new_version}|[![Anaconda-Server Badge]"
Expand Down Expand Up @@ -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 += (
Expand All @@ -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 = ""
Expand Down