aboutsummaryrefslogtreecommitdiff
path: root/buildbot-utils.el
diff options
context:
space:
mode:
authorYuchen Pei <hi@ypei.me>2023-03-24 00:08:42 +1100
committerYuchen Pei <hi@ypei.me>2023-03-24 00:08:42 +1100
commit94172a6c655ea4aefe2960aa5db9fec77130e87d (patch)
tree59b27daaf1f553d5e282799941af27c01aeadfaa /buildbot-utils.el
parent7cc017ccc12921e38d0ace50400e096a4f6ddd2b (diff)
Adding step mode. Also refactoring
Diffstat (limited to 'buildbot-utils.el')
-rw-r--r--buildbot-utils.el9
1 files changed, 9 insertions, 0 deletions
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)