smoke: --labels to route the smoke item (e.g. model:sol)

This commit is contained in:
jj.wang
2026-10-21 07:27:27 +00:00
parent bcc5fd44e7
commit a505c138e0
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -116,6 +116,9 @@ def cmd_smoke(cfg, a):
body = {"name": "agentd smoke %s %s" % (a.terminal, time.strftime("%Y-%m-%d %H:%M")),
"description_html": SMOKE_BRIEF, "state": pl.states(p["id"])[p["states"]["todo"]],
"assignees": [pl.members()[user]]}
if a.labels:
labels = pl.labels(p["id"])
body["labels"] = [labels[x] for x in a.labels.split(",")]
issue = pl.create_issue(p["id"], body)
key = "%s-%s" % (p.get("key_prefix", a.project), issue["sequence_id"])
print("created %s; ticking every %ss (timeout %s min)" % (key, a.interval, a.timeout))
@@ -195,6 +198,7 @@ def parser():
s.add_argument("terminal")
s.add_argument("--interval", type=int, default=30)
s.add_argument("--timeout", type=int, default=30, help="minutes")
s.add_argument("--labels", default="", help="comma-separated Plane labels, e.g. model:sol")
s.add_argument("--as", dest="as_")
s.set_defaults(fn=cmd_smoke)
sub.add_parser("check-config", help="validate the config and list token env vars").set_defaults(fn=cmd_check_config)