File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ class Workflow:
4141 name : str
4242 status : str
4343 path : Path
44+ conclusion : str = ""
4445 branch : str = "-"
4546 started_at : datetime .datetime | None = None
4647 updated_at : datetime .datetime | None = None
@@ -51,7 +52,7 @@ def check(self) -> str:
5152 Checkmark.
5253 """
5354 if self .status == "completed" :
54- return "✅"
55+ return "✅" if self . conclusion == "success" else "❌"
5556 if self .status == "in_progress" :
5657 return "🕒"
5758 if self .status == "queued" :
@@ -201,6 +202,8 @@ def get_workflow(path: Path) -> Workflow | None:
201202 "--json" ,
202203 "status" ,
203204 "--json" ,
205+ "conclusion" ,
206+ "--json" ,
204207 "startedAt" ,
205208 "--json" ,
206209 "updatedAt" ,
@@ -226,6 +229,7 @@ def get_workflow(path: Path) -> Workflow | None:
226229 return Workflow (
227230 name = get_workflow_name (path ),
228231 status = data ["status" ],
232+ conclusion = data ["conclusion" ],
229233 started_at = datetime .datetime .fromisoformat (data ["startedAt" ]),
230234 updated_at = datetime .datetime .fromisoformat (data ["updatedAt" ]),
231235 branch = data ["headBranch" ],
You can’t perform that action at this time.
0 commit comments