From 9714d2e9b7510d002b0bbd4fd0d6b396a72fdf8b Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Sun, 26 Mar 2023 19:02:17 +1100 Subject: branch view (first imp); faces for status; revision with multiple changes --- buildbot-client.el | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'buildbot-client.el') diff --git a/buildbot-client.el b/buildbot-client.el index a633ff0..a1aa28b 100644 --- a/buildbot-client.el +++ b/buildbot-client.el @@ -35,7 +35,7 @@ (buildbot-url-fetch-raw (format "%s/api/v2/logs/%d/raw" buildbot-host logid))) -(defun buildbot-api-recent-changes (limit) +(defun buildbot-get-recent-changes (limit) (buildbot-api-change (list (cons 'order "-changeid") (cons 'limit limit)))) (defun buildbot-get-all-builders () @@ -53,11 +53,9 @@ (defun buildbot-get-builder-name-by-id (id) (alist-get 'name (buildbot-builder-by-id id))) -(defun buildbot-get-change-by-revision (revision) - (elt - (alist-get 'changes - (buildbot-api-change (list (cons 'revision revision)))) - 0)) +(defun buildbot-get-changes-by-revision (revision) + (alist-get 'changes + (buildbot-api-change (list (cons 'revision revision))))) (defun buildbot-get-build-by-buildid (buildid) (buildbot-api-build (list (cons 'buildid buildid)))) @@ -82,4 +80,10 @@ (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 + (cons `(branch . ,branch-name) + (when limit `((limit . ,limit))))))) + (provide 'buildbot-client) -- cgit v1.2.3