guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Mathieu Othacehe
Date: Wed, 10 Mar 2021 07:57:19 -0500 (EST)

branch: master
commit 826e2df45eb533fb3e412cd0c8b2e900fe736599
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Wed Mar 10 13:48:03 2021 +0100

    specification: channel->sexp: Add introduction support.
    
    * src/cuirass/specification.scm (channel->sexp): Add channel introduction
    support.
---
 src/cuirass/specification.scm | 28 ++++++++++++++++++++++------
 1 file changed, 22 insertions(+), 6 deletions(-)

diff --git a/src/cuirass/specification.scm b/src/cuirass/specification.scm
index 1126e52..2d492cb 100644
--- a/src/cuirass/specification.scm
+++ b/src/cuirass/specification.scm
@@ -18,6 +18,9 @@
 
 (define-module (cuirass specification)
   #:use-module (guix channels)
+  #:use-module ((guix openpgp)
+                #:select (openpgp-public-key-fingerprint
+                          openpgp-format-fingerprint))
   #:use-module (guix records)
   #:use-module (guix ui)
   #:use-module (guix utils)
@@ -91,12 +94,25 @@
 
 (define (channel->sexp channel)
   "Return an sexp describing CHANNEL."
-  `(repository
-    (version 0)
-    (url ,(channel-url channel))
-    (branch ,(channel-branch channel))
-    (commit ,(channel-commit channel))
-    (name ,(channel-name channel))))
+  (let ((intro (channel-introduction channel)))
+    `(repository
+      (version 0)
+      (url ,(channel-url channel))
+      (branch ,(channel-branch channel))
+      (commit ,(channel-commit channel))
+      (name ,(channel-name channel))
+      ,@(if intro
+            `((introduction
+               (channel-introduction
+                (version 0)
+                (commit
+                 ,(channel-introduction-first-signed-commit
+                   intro))
+                (signer
+                 ,(openpgp-format-fingerprint
+                   (channel-introduction-first-commit-signer
+                    intro))))))
+            '()))))
 
 
 ;;;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]