aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuchen Pei <id@ypei.org>2023-07-15 11:11:47 +1000
committerYuchen Pei <id@ypei.org>2023-07-15 13:53:00 +1000
commit353f23d9849a911e59aae729f4de2a847a8839a4 (patch)
tree28c6e2b25ab29a8441af68cb4db4909765f86014
parent61e004a917a2b10aa23a7a683e28e8bd5ae2d683 (diff)
Some trivial style changes
-rw-r--r--buildbot-client.el17
1 files changed, 10 insertions, 7 deletions
diff --git a/buildbot-client.el b/buildbot-client.el
index 06e43d6..ae6ff44 100644
--- a/buildbot-client.el
+++ b/buildbot-client.el
@@ -29,7 +29,8 @@
(defvar buildbot-host nil "Buildbot instance host.")
(defvar buildbot-builders nil
- "Buildbot builders. Can be generated with `(buildbot-get-all-builders)'.")
+ "Buildbot builders.
+Can be generated with `(buildbot-get-all-builders)'.")
(defun buildbot-api-change (attr)
"Call the Changes API with ATTR."
@@ -38,7 +39,7 @@
"%s/api/v2/changes?%s"
buildbot-host (buildbot-format-attr attr))))
-(defun buildbot-api-logs (stepid)
+(defun buildbot-api-log (stepid)
"Call the Logs API with STEPID."
(buildbot-url-fetch-json
(format
@@ -79,15 +80,17 @@
(format "%s/api/v2/logs/%d/raw" buildbot-host logid)))
(defun buildbot-get-recent-builds-by-builder (builder-id limit)
- "Get LIMIT number of recent builds with BUILDER-ID."
+ "Get LIMIT number of recent builds by the builder with BUILDER-ID."
(alist-get 'builds
(buildbot-api-builders-builds
builder-id
- `((limit . ,limit) (order . "-number") (property . "revision")))))
+ `((limit . ,limit)
+ (order . "-number")
+ (property . "revision")))))
(defun buildbot-get-recent-changes (limit)
"Get LIMIT number of recent changes."
- (buildbot-api-change (list (cons 'order "-changeid") (cons 'limit limit))))
+ (buildbot-api-change `((order . "-changeid") (limit . ,limit))))
(defun buildbot-get-all-builders ()
"Get all builders."
@@ -109,7 +112,7 @@
(defun buildbot-get-logs-by-stepid (stepid)
"Get logs of a step with STEPID."
- (alist-get 'logs (buildbot-api-logs stepid)))
+ (alist-get 'logs (buildbot-api-log stepid)))
(defun buildbot-get-builder-name-by-id (id)
"Get a builder name with ID."
@@ -118,7 +121,7 @@
(defun buildbot-get-changes-by-revision (revision)
"Get the changes from a REVISION."
(alist-get 'changes
- (buildbot-api-change (list (cons 'revision revision)))))
+ (buildbot-api-change `((revision . ,revision)))))
(defun buildbot-get-build-by-buildid (buildid)
"Get a build with BUILDID."