aboutsummaryrefslogtreecommitdiff
path: root/buildbot-utils.el
diff options
context:
space:
mode:
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)