aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuchen Pei <hi@ypei.me>2023-03-27 15:34:18 +1100
committerYuchen Pei <hi@ypei.me>2023-03-27 15:34:18 +1100
commitc79dd7c405cf170996e881a422f848ed3d5e015a (patch)
tree0549dd47bd2e428d096cd7aa23fa756809e5ebd2
parent47521e266136087846ef928c1377e6a0e4630ce8 (diff)
linting
-rw-r--r--buildbot-client.el20
-rw-r--r--buildbot-utils.el3
-rw-r--r--buildbot-view.el5
-rw-r--r--buildbot.el3
4 files changed, 7 insertions, 24 deletions
diff --git a/buildbot-client.el b/buildbot-client.el
index a1aa28b..2d808f5 100644
--- a/buildbot-client.el
+++ b/buildbot-client.el
@@ -1,6 +1,9 @@
;; -*- lexical-binding: t; -*-
(require 'buildbot-utils)
+(defvar buildbot-host)
+(defvar buildbot-builders)
+
(defun buildbot-api-change (attr)
(buildbot-url-fetch-json
(format
@@ -60,26 +63,9 @@
(defun buildbot-get-build-by-buildid (buildid)
(buildbot-api-build (list (cons 'buildid buildid))))
-(defun buildbot-get-builds-by-revision (revision)
- (alist-get 'builds (buildbot-get-change-by-revision revision)))
-
-(defun buildbot-get-failed-builds-by-revision (revision)
- (seq-filter
- (lambda (build)
- (not (equal (alist-get 'state_string build) "build successful")))
- (buildbot-get-builds-by-revision revision)))
-
-(defun buildbot-format-builds-by-revision (revision)
- (mapcar
- 'buildbot-format-build
- (buildbot-get-builds-by-revision revision)))
-
(defun buildbot-get-steps-by-buildid (buildid)
(alist-get 'steps (buildbot-api-step buildid)))
-(defun buildbot-get-logs-by-stepid (stepid)
- (alist-get 'logs (buildbot-api-logs stepid)))
-
(defun buildbot-get-changes-by-branch (branch-name limit)
(alist-get 'changes
(buildbot-api-change
diff --git a/buildbot-utils.el b/buildbot-utils.el
index b748f6d..fec0070 100644
--- a/buildbot-utils.el
+++ b/buildbot-utils.el
@@ -1,4 +1,7 @@
;; -*- lexical-binding: t; -*-
+
+(defvar buildbot-client-buffer-name "*buildbot api*")
+
(defun buildbot-parse-http-header (text)
(let ((status) (fields))
(with-temp-buffer
diff --git a/buildbot-view.el b/buildbot-view.el
index 8c6e2df..2b6e52e 100644
--- a/buildbot-view.el
+++ b/buildbot-view.el
@@ -1,5 +1,6 @@
;; -*- lexical-binding: t; -*-
(require 'buildbot-utils)
+(require 'buildbot-client)
(defvar buildbot-view-header-regex "^\\[.*\\]$")
(defvar buildbot-view-branch-change-limit 10)
@@ -43,10 +44,6 @@
(alist-get 'failure stats)
(alist-get 'pending stats)))
-(defun buildbot-view-format-state-string (state-string)
- (propertize state-string
- 'face (buildbot-get-face-for-state-string (state-string))))
-
(defun buildbot-view-format-build (build)
(propertize
(format "\n[%s | %s]\n%s"
diff --git a/buildbot.el b/buildbot.el
index e799410..b2740eb 100644
--- a/buildbot.el
+++ b/buildbot.el
@@ -1,7 +1,4 @@
;; -*- lexical-binding: t; -*-
-(defvar buildbot-client-buffer-name "*buildbot api*")
-(defvar buildbot-host nil)
-
(require 'buildbot-client)
(defvar buildbot-builders (buildbot-get-all-builders))
(require 'buildbot-view)