Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable automerge for bad deps #1130

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -73,3 +73,4 @@ class FeedstockContext:
package_name: str
feedstock_name: str
attrs: "AttrsTypedDict"
passed_dep_analysis = True
10 changes: 8 additions & 2 deletions conda_forge_tick/migrators/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,7 @@ def pr_body(self, feedstock_ctx: FeedstockContext) -> str:
"If you encounter issues with this feature please ping the bot team `conda-forge/bot`.\n\n"
)
if dep_comparison:
feedstock_ctx.passed_dep_analysis = False
df_cf = ""
for k in dep_comparison.get("df_minus_cf", set()):
df_cf += f"- {k}" + "\n"
Expand All @@ -680,6 +681,11 @@ def pr_body(self, feedstock_ctx: FeedstockContext) -> str:
f"\n\n### Packages found in the meta.yaml but not found by inspection:\n"
f"{cf_df}"
)
hint += f"\n\n @conda-forge-admin please ping {feedstock_ctx.attrs['name']} It seems that there are" \
f"some discrepancies in the dependencies please address them if possible. "
if feedstock_ctx.attrs.get("conda-forge.yml", {}).get("bot", {}).get("automerge", False,) in {"version", True}:
hint += "Note that automerge has been disabled for this PR because of the dependency issues. You can" \
"restore automerge by disabling this feature in your `conda-forge.yml`"
beckermr marked this conversation as resolved.
Show resolved Hide resolved
else:
hint += (
"Analysis of the source code shows **no** discrepancy between"
Expand All @@ -695,9 +701,9 @@ def commit_message(self, feedstock_ctx: FeedstockContext) -> str:
def pr_title(self, feedstock_ctx: FeedstockContext) -> str:
assert isinstance(feedstock_ctx.attrs["new_version"], str)
# TODO: turn False to True when we default to automerge
if feedstock_ctx.attrs.get("conda-forge.yml", {}).get("bot", {}).get(
if (feedstock_ctx.attrs.get("conda-forge.yml", {}).get("bot", {}).get(
"automerge", False,
) in {"version", True}:
) in {"version", True}) and feedstock_ctx.passed_dep_analysis:
add_slug = "[bot-automerge] "
else:
add_slug = ""
Expand Down