Kill the surviving mutants of the e2e command's settings, sandbox and entry point

This commit is contained in:
2026-11-19 03:53:14 +01:00
parent 68d7a31920
commit b709e03023
6 changed files with 115 additions and 30 deletions
+5 -8
View File
@@ -62,13 +62,10 @@ def epic_made(sandbox: Sandbox, summary: str, http: Http = jira_json, to_adf: To
def deleted_with_children(sandbox: Sandbox, key: str, authorization: str, http: Http) -> None | Failure:
"""Deletes the epic's child issues, with their sub-tasks, and then the epic: Jira deletes an epic's sub-tasks along with it, but not its child issues."""
children = http("POST", api(sandbox, "search/jql"), authorization, {"jql": f"parent = {key}", "fields": ["summary"], "maxResults": 100})
if isinstance(children, Failure):
return children
found = children.get("issues") if isinstance(children, dict) else None
if not isinstance(found, list):
return Failure(f"Jira answered the search for {key}'s issues with {children!r}, which holds no issues")
for each in [item.get("key") for item in found if isinstance(item, dict)] + [key]:
# The first failure is the one to report; the epic is deleted all the same.
problem = children if isinstance(children, Failure) else None if isinstance(found, list) else Failure(f"Jira answered the search for {key}'s issues with {children!r}, which holds no issues")
for each in [*(item.get("key") for item in found if isinstance(item, dict)), key] if isinstance(found, list) else [key]:
deleted = http("DELETE", api(sandbox, f"issue/{each}?deleteSubtasks=true"), authorization, None)
if isinstance(deleted, Failure):
return deleted
return None
problem = problem or (deleted if isinstance(deleted, Failure) else None)
return problem