Commit ba158458 authored by Eric Timmons's avatar Eric Timmons

Add repo-to-description

parent abc1e9c1
......@@ -13,6 +13,7 @@
#:clpi/metadata
#:clpi/project
#:clpi/release
#:clpi/repos
#:clpi/system
#:clpi/system-file
#:clpi/system-release)
......@@ -22,6 +23,7 @@
#:clpi/http-index
#:clpi/project
#:clpi/release
#:clpi/repos
#:clpi/system
#:clpi/system-file
#:clpi/system-release)
......
......@@ -5,8 +5,10 @@
(uiop:define-package #:clpi/repos
(:use #:cl
#:clpi/repos/defs
#:clpi/repos/github
#:clpi/repos/gitlab)
(:reexport #:clpi/repos/defs)
(:reexport #:clpi/repos/github)
(:reexport #:clpi/repos/gitlab)
(:export #:make-repo-from-description))
......
......@@ -4,7 +4,8 @@
;;;; LICENSE for license information.
(uiop:define-package #:clpi/repos/github
(:use #:cl)
(:use #:cl
#:clpi/repos/defs)
(:export #:github-repo
#:github-repo-host
#:github-repo-path))
......@@ -20,3 +21,9 @@
:initarg :path
:initform (error "Path must be provided")
:reader github-repo-path)))
(defmethod repo-to-description ((repo github-repo))
`(:github
,@(when (not (equal (github-repo-host repo) "github.com"))
(list :host (github-repo-host repo)))
:path ,(github-repo-path repo)))
......@@ -4,7 +4,8 @@
;;;; LICENSE for license information.
(uiop:define-package #:clpi/repos/gitlab
(:use #:cl)
(:use #:cl
#:clpi/repos/defs)
(:export #:gitlab-repo
#:gitlab-repo-host
#:gitlab-repo-path))
......@@ -20,3 +21,9 @@
:initarg :path
:initform (error "Path must be provided")
:reader gitlab-repo-path)))
(defmethod repo-to-description ((repo gitlab-repo))
`(:gitlab
,@(when (not (equal (gitlab-repo-host repo) "gitlab.com"))
(list :host (gitlab-repo-host repo)))
:path ,(gitlab-repo-path repo)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment