We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 01784ab commit 32931b0Copy full SHA for 32931b0
swattool/review.py
@@ -62,13 +62,17 @@ def _prompt_bug_infos(build: swatbuild.Build,
62
63
64
def _create_new_status(build: swatbuild.Build, command: str
65
- ) -> userdata.Triage:
+ ) -> Optional[userdata.Triage]:
66
"""Create new status for a given failure."""
67
newstatus = userdata.Triage()
68
if command in ["a", "b"]:
69
newstatus = _prompt_bug_infos(build, command == "a")
70
elif command == "c":
71
+ if build.status != swatbuild.Status.CANCELLED:
72
+ logging.error("Only cancelled builds can be triaged as cancelled")
73
+ return None
74
newstatus.status = swatbotrest.TriageStatus.CANCELLED
75
+ newstatus.comment = "Cancelled"
76
elif command == "m":
77
newstatus.status = swatbotrest.TriageStatus.MAIL_SENT
78
elif command == "i" and utils.MAILNAME:
0 commit comments