diff --git a/guix-data-service/web/controller.scm b/guix-data-service/web/controller.scm index 67db909..c245144 100644 --- a/guix-data-service/web/controller.scm +++ b/guix-data-service/web/controller.scm @@ -88,6 +88,8 @@ commit-hash) (let ((packages-count (count-packages-in-revision conn commit-hash)) + (git-repositories-and-branches + (git-branches-with-repository-details-for-commit conn commit-hash)) (derivations-counts (count-packages-derivations-in-revision conn commit-hash))) (case (most-appropriate-mime-type @@ -108,6 +110,7 @@ (view-revision commit-hash packages-count + git-repositories-and-branches derivations-counts)))))) (define (texinfo->variants-alist s) diff --git a/guix-data-service/web/view/html.scm b/guix-data-service/web/view/html.scm index 4e8e785..54ce0b0 100644 --- a/guix-data-service/web/view/html.scm +++ b/guix-data-service/web/view/html.scm @@ -402,7 +402,8 @@ (td ,(build-status-span status))))) derivations))))))))) -(define (view-revision commit-hash packages-count derivations-count) +(define (view-revision commit-hash packages-count + git-repositories-and-branches derivations-count) (layout #:extra-headers '((cache-control . ((max-age . 60)))) @@ -426,7 +427,28 @@ ,packages-count) (a (@ (href ,(string-append "/revision/" commit-hash "/packages"))) - "View packages")) + "View packages") + + ,@(if + (null? git-repositories-and-branches) + '() + `((h3 "Git repositories") + ,@(map + (match-lambda + (((label url cgit-url-base) . branches) + `((h4 ,url) + ,@(map + (match-lambda + ((name datetime) + (if (string-null? cgit-url-base) + `(,name " at " ,datetime) + `(a (@ (href ,(string-append + cgit-url-base + "commit/?id=" + commit-hash))) + ,name " at " ,datetime)))) + branches)))) + git-repositories-and-branches)))) (div (@ (class "col-md-6")) (h3 "Derivations")