Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def filter_workflow_runs(run, issue):

success_rate = 1.0
if len(workflow_runs):
failed_runs = list(filter(lambda r: r.status == "failure", workflow_runs))
failed_runs = list(filter(lambda r: r.status == "failure" | r.status == "cancelled", workflow_runs))
print(f"Number of failed workflow runs: {len(failed_runs)}")
success_rate -= len(failed_runs) / len(workflow_runs)

Expand Down Expand Up @@ -285,13 +285,12 @@ async def fetch_workflow_runs():
def append_workflow_runs(workflow, runs):
workflow_runs = {}
for run in runs:
# Getting rid of all runs with a "skipped" status to display
# only actual runs
# Getting rid of all "skipped" runs to display only actual runs
# Possible values for run["status"] are ["queued", "in_progress", "completed"]
if run["conclusion"] != "skipped":
status = ""
if run["status"] == "completed":
status = run["conclusion"]
elif run["status"] != "cancelled":
else:
status = run["status"]
workflow_run = WorkflowRun(
run["id"],
Expand Down
Loading