1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-27 08:10:08 +00:00

only print job status for some status values

This commit is contained in:
Siddharth Agrawal 2022-10-18 17:59:58 +05:30
parent a86e5876eb
commit c99a1c5fb5

View file

@ -30,10 +30,10 @@ def get_resp_items(resp):
def get_status_text(status): def get_status_text(status):
if status == "success": if status == "success":
return COLORS.FG.green + "" + COLORS.reset return COLORS.FG.green + "" + COLORS.reset
elif status in ("running", "not_run", "retried", "queued"): elif status in ("running", "not_run", "retried"):
return COLORS.FG.yellow + "·" + COLORS.reset return COLORS.FG.yellow + "" + COLORS.reset
else: else:
return COLORS.FG.red + "˟" + COLORS.reset return COLORS.FG.red + "" + COLORS.reset
if not org_slug or len(args) != 3: if not org_slug or len(args) != 3:
@ -64,6 +64,8 @@ jobs = get_resp_items(response)
for job in jobs: for job in jobs:
status = job["status"] status = job["status"]
if status in ("success", "running", "failed", "retried", "timedout",
"on_hold", "canceled", "terminated_unknown"):
name = job["name"] name = job["name"]
project_slug = job["project_slug"] project_slug = job["project_slug"]
job_number = job["job_number"] job_number = job["job_number"]