(epkg-add-org-header rows header)
up
(let ((zero 0)
(one 0)
(more 0)
(odd 0)
(none 0)
(all 0))
(dolist (pkg (epkgs nil [mirrored*]))
(cl-incf all)
(with-epkg-repository pkg
(if-let ((tag (magit-git-string "tag" "--sort=-v:refname")))
(if-let ((major (ignore-errors
(car (version-to-list
(if (string-match "\\`[^0-9]*" tag)
(substring tag (match-end 0))
tag))))))
(pcase major
(0 (cl-incf zero))
(1 (cl-incf one))
(_ (cl-incf more)))
(message "%-20s %s" (oref pkg name) tag)
(cl-incf odd))
(cl-incf none))))
(list (list 'zero zero (/ (* 100 zero) all))
(list 'one one (/ (* 100 one) all))
(list 'more more (/ (* 100 more) all))
'hline
(list 'none none (/ (* 100 none) all))
(list 'odd odd (/ (* 100 odd) all))
'hline
(list 'total all (/ (* 100 all) all))))
(6) | # | % |
zero | 1770 | 25 |
one | 1047 | 14 |
more | 554 | 7 |
none | 3647 | 51 |
odd | 30 | 0 |
total | 7048 | 100 |