From 94172a6c655ea4aefe2960aa5db9fec77130e87d Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Fri, 24 Mar 2023 00:08:42 +1100 Subject: Adding step mode. Also refactoring --- buildbot-utils.el | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'buildbot-utils.el') diff --git a/buildbot-utils.el b/buildbot-utils.el index 269cdf3..3d4a901 100644 --- a/buildbot-utils.el +++ b/buildbot-utils.el @@ -51,4 +51,13 @@ (format-time-string "%Y-%m-%d %a %H:%M:%S %Z" (encode-time (decode-time epoch)))) + +(defun buildbot-build-status (build) + (let ((state (alist-get 'state_string build))) + (cond ((equal state "build successful") + 'success) + ((string-suffix-p "(failure)" state) + 'failure) + (t 'pending)))) + (provide 'buildbot-utils) -- cgit v1.2.3