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 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 @@
),
)
)

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

Check warning on line 347 in conda_forge_tick/migrators/version.py

View check run for this annotation

Codecov / codecov/patch

conda_forge_tick/migrators/version.py#L346-L347

Added lines #L346 - L347 were not covered by tests
"\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 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 (

Check warning on line 370 in conda_forge_tick/migrators/version.py

View check run for this annotation

Codecov / codecov/patch

conda_forge_tick/migrators/version.py#L370

Added line #L370 was not covered by tests
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
Loading