Skip to content

A peer-to-peer stack for code collaboration

Use names in CLI tool. (#339)

Julian Arni10afd5d5873c
diff --git a/bin/rad-issues b/bin/rad-issues
index 4867727..e5af25c 100755
--- a/bin/rad-issues
+++ b/bin/rad-issues
@@ -41,7 +41,8 @@
(def list-issues
(fn [chain]
(def chain-ref (make-chain-ref chain))
-
+ (load! "rad/monadic/names.rad")
+ (def names (ref (chain/load-chain! name-base)))
(def mk-key (fn [v]
(match v
['key 'val] [(string-append (show key) " - " (lookup :title val)) val])))
@@ -50,7 +51,13 @@
(def comment-divider "---")
(def username
(fn [d]
- (catch 'any (lookup :github-username d) (fn [x] "???"))))
+ (catch
+ 'any
+ (lookup :github-username d)
+ (fn [x]
+ (match (lookup-key names (lookup :author d))
+ :nothing "???"
+ 'name name)))))
(def issue-number (fn [d] (lookup :number d)))
(def body (fn [d] (lookup :body d)))
(def pretty-comment (fn [c]
diff --git a/rad/monadic/issues.rad b/rad/monadic/issues.rad
index c11e232..5fa99b1 100644
--- a/rad/monadic/issues.rad
+++ b/rad/monadic/issues.rad
@@ -12,9 +12,6 @@
"The name of this chain."
"monadic/radicle/issues")
-(def issues-chain
- (ref (chain/load-chain! "http://localhost:8000/chains/radicle-issues")))
-
(def create-issues-chain!
"Create a remote issue chain with the given url."
(fn [url]