aboutsummaryrefslogtreecommitdiff
path: root/buildbot-utils.el
diff options
context:
space:
mode:
authorYuchen Pei <hi@ypei.me>2023-03-27 00:28:59 +1100
committerYuchen Pei <hi@ypei.me>2023-03-27 00:28:59 +1100
commit47521e266136087846ef928c1377e6a0e4630ce8 (patch)
tree6d4c8015b74fa27ce537eb276b7ee367035b33e8 /buildbot-utils.el
parent9714d2e9b7510d002b0bbd4fd0d6b396a72fdf8b (diff)
fixing branches and revisions are many-to-many relations
- in branch view, show revisions with build stats and all builds - in revision view, show branches with build stats and all builds
Diffstat (limited to 'buildbot-utils.el')
-rw-r--r--buildbot-utils.el20
1 files changed, 12 insertions, 8 deletions
diff --git a/buildbot-utils.el b/buildbot-utils.el
index e268e52..b748f6d 100644
--- a/buildbot-utils.el
+++ b/buildbot-utils.el
@@ -120,23 +120,27 @@
builds)
results))
-(defun buildbot-get-info-and-builds (changes)
+(defun buildbot-get-revision-and-changes-info (changes)
"Get revision-info and builds from a set of changes of the same revision.
Concat all builds."
- (let* ((builds (seq-mapcat
- (lambda (change)
- (alist-get 'builds change))
+ (let* ((changes-info
+ (mapcar (lambda (change)
+ (list
+ (assq 'branch change)
+ (assq 'builds change)
+ (cons 'build-stats
+ (buildbot-get-build-stats
+ (alist-get 'builds change)))))
changes))
(first-change (elt changes 0))
- (info (list
+ (revision-info (list
(assq 'revision first-change)
(assq 'author first-change)
(cons 'created-at
(buildbot-format-epoch-time
(alist-get 'when_timestamp first-change)))
- (assq 'comments first-change)
- (cons 'build-stats (buildbot-get-build-stats builds)))))
- `((revision-info . ,info) (builds . ,builds))))
+ (assq 'comments first-change))))
+ `((revision-info . ,revision-info) (changes-info . ,changes-info))))
(provide 'buildbot-utils)