diff options
author | Yuchen Pei <hi@ypei.me> | 2023-03-27 00:28:59 +1100 |
---|---|---|
committer | Yuchen Pei <hi@ypei.me> | 2023-03-27 00:28:59 +1100 |
commit | 47521e266136087846ef928c1377e6a0e4630ce8 (patch) | |
tree | 6d4c8015b74fa27ce537eb276b7ee367035b33e8 /buildbot-utils.el | |
parent | 9714d2e9b7510d002b0bbd4fd0d6b396a72fdf8b (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.el | 20 |
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) |