mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-19 21:41:07 +01:00
only print job status for some status values
This commit is contained in:
parent
a86e5876eb
commit
c99a1c5fb5
1 changed files with 10 additions and 8 deletions
|
@ -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"]
|
||||||
|
|
Loading…
Reference in a new issue