From 6085cded3877ae028738f2245792b4caaed02f7c Mon Sep 17 00:00:00 2001 From: Yih-Dar <2521628+ydshieh@users.noreply.github.com> Date: Wed, 4 Jun 2025 11:38:25 +0200 Subject: [PATCH] update `utils/notification_service.py` for AMD vs Nvidia (#38563) update Co-authored-by: ydshieh --- utils/get_previous_daily_ci.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/get_previous_daily_ci.py b/utils/get_previous_daily_ci.py index 83828d645d..2c0d1a8101 100644 --- a/utils/get_previous_daily_ci.py +++ b/utils/get_previous_daily_ci.py @@ -57,8 +57,8 @@ def get_last_daily_ci_run(token, workflow_run_id=None, workflow_id=None, commit_ if commit_sha in [None, ""] and run["status"] == "completed": workflow_run = run break - # if `commit_sha` is specified, and `workflow_run["head_sha"]` matches it, return it. - elif commit_sha not in [None, ""] and run["head_sha"] == commit_sha: + # if `commit_sha` is specified, return the latest completed run with `workflow_run["head_sha"]` matching the specified sha. + elif commit_sha not in [None, ""] and run["head_sha"] == commit_sha and run["status"] == "completed": workflow_run = run break