Skip to content

A peer-to-peer stack for code collaboration

Make issue & diff app wording consistent (#472)

Merle Breitkreuzb979ca623718
diff --git a/README.md b/README.md
index 6aeb4f6..9b2b1b5 100644
--- a/README.md
+++ b/README.md
@@ -37,7 +37,7 @@ rad> (fac 6)
We are currently using `radicle` itself to manage issues, and have therefore
disabled issues on Github. You can create and see issues with the
-`bin/rad-issues` script. You can also reach us on the `radicle` IRC channel on
+`bin/rad-issue` script. You can also reach us on the `radicle` IRC channel on
`#freenode`.
## Development
diff --git a/bin/rad-issues b/bin/rad-issue
similarity index 96%
rename from bin/rad-issues
rename to bin/rad-issue
index ad99da3..5d13338 100755
--- a/bin/rad-issues
+++ b/bin/rad-issue
@@ -1,14 +1,14 @@
#!/usr/bin/env radicle
(load! (find-module-file! "prelude.rad"))
-(load! (find-module-file! "monadic/issues.rad"))
+(load! (find-module-file! "monadic/issue.rad"))
(load! (find-module-file! "monadic/project.rad"))
(load! (find-module-file! "prelude/io-utils.rad"))
(import prelude/validation :as 'validation)
(import prelude/machine :as 'machine)
-(def machine-name (fn [] (get-rsm-of-type! :rad-issues)))
+(def machine-name (fn [] (get-rsm-of-type! :rad-issue)))
(def valid-states ["open" "closed"])
@@ -22,14 +22,14 @@
(def help
(string-append
- "rad-issues - Radicle issue CLI
+ "rad-issue - Radicle issue CLI
Usage:
- rad-issues list " list-opts-help "
- rad-issues new
- rad-issues [show | close] <issue-number>
- rad-issues comment <issue-number> <comment>
- rad-issues help
+ rad-issue list " list-opts-help "
+ rad-issue new
+ rad-issue [show | close] <issue-number>
+ rad-issue comment <issue-number> <comment>
+ rad-issue help
list - Select from issues to view or comment on
new - Create a new issue in $EDITOR
diff --git a/bin/rad-project b/bin/rad-project
index e8130e8..3a3b1b4 100755
--- a/bin/rad-project
+++ b/bin/rad-project
@@ -1,7 +1,7 @@
#!/usr/bin/env radicle
(load! (find-module-file! "prelude.rad"))
-(load! (find-module-file! "monadic/issues.rad"))
+(load! (find-module-file! "monadic/issue.rad"))
(load! (find-module-file! "monadic/diff.rad"))
(load! (find-module-file! "monadic/project.rad"))
(load! (find-module-file! "prelude/io-utils.rad"))
@@ -93,14 +93,14 @@
(process! "git" ["init"] "")
(def repo (setup-repo!))
(put-str! (string-append "=> adding \"origin\" remote: " repo))
- (def issues (create-issues-machine!))
- (put-str! "=> Assembled rad-issues machine")
- (def diff (create-diffs-machine!))
+ (def issues (create-issue-machine!))
+ (put-str! "=> Assembled rad-issue machine")
+ (def diff (create-diff-machine!))
(put-str! "=> Assembled rad-diff machine")
(put-str! (string-append "=> project id: " project))
(process! "git" ["remote" "add" "origin" repo] "")
(add-rsm! project { :id repo :type :rad-repo })
- (add-rsm! project { :id issues :type :rad-issues })
+ (add-rsm! project { :id issues :type :rad-issue })
(add-rsm! project { :id diff :type :rad-diff })
(set-git-config! "radicle.project-id" project)
(put-str! "=> project created!")))
diff --git a/rad/monadic/diff-remote.rad b/rad/monadic/diff-remote.rad
index 7122b96..84fe599 100644
--- a/rad/monadic/diff-remote.rad
+++ b/rad/monadic/diff-remote.rad
@@ -13,7 +13,7 @@
(def machine-id
"The name of this machine."
- "monadic/radicle/diffs")
+ "monadic/radicle/diff")
(def diffs
"DIFFs are stored in a dict in a ref, keyed by diff-number."
diff --git a/rad/monadic/diff.rad b/rad/monadic/diff.rad
index 280afcb..8e8a9cb 100644
--- a/rad/monadic/diff.rad
+++ b/rad/monadic/diff.rad
@@ -8,9 +8,9 @@
(def radicle-diff-machine-id
"The name of this machine."
- "monadic/radicle/diffs")
+ "monadic/radicle/diff")
-(def create-diffs-machine!
+(def create-diff-machine!
"Create a remote diff machine. Returns the machine id"
(fn []
(def owner-keys (lookup :public-key (read-keys!)))
@@ -78,13 +78,13 @@
(machine/query! machine '(list-diffs))))
(:test
- "The monadic diffs machine works."
+ "The monadic diff machine works."
[:setup
(do (machine/install-remote-machine-fake)
(def owner-keys (gen-key-pair! (default-ecc-curve)))
(def non-owner-keys (gen-key-pair! (default-ecc-curve)))
(set-fake-keys! owner-keys)
- (def machine (create-diffs-machine!))
+ (def machine (create-diff-machine!))
(simple-create-diff! machine {:title "title0" :description "desc0" :patch "patch0"})
(simple-create-diff! machine {:title "title1" :description "desc1" :patch "patch1"})
(simple-add-comment! machine 0 "comment0" "name0")
diff --git a/rad/monadic/issue-remote.rad b/rad/monadic/issue-remote.rad
index d23943f..e6aa604 100644
--- a/rad/monadic/issue-remote.rad
+++ b/rad/monadic/issue-remote.rad
@@ -16,7 +16,7 @@
(def machine-id
"The name of this machine."
- "monadic/radicle/issues")
+ "monadic/radicle/issue")
(def issues
"Issues are stored in a dict in a ref, keyed by issue-number."
diff --git a/rad/monadic/issues.rad b/rad/monadic/issue.rad
similarity index 88%
rename from rad/monadic/issues.rad
rename to rad/monadic/issue.rad
index 12cd4c2..4cf1248 100644
--- a/rad/monadic/issues.rad
+++ b/rad/monadic/issue.rad
@@ -1,8 +1,8 @@
-;; Helpers for setting up and interacting with the issues machine (as defined in
-;; rad/monadic/issues-remote.rad)
-{:module 'monadic/issues
- :doc "Functions for interacting with issues machine"
- :exports '[create-issues-machine!]}
+;; Helpers for setting up and interacting with the issue machine (as defined in
+;; rad/monadic/issue-remote.rad)
+{:module 'monadic/issue
+ :doc "Functions for interacting with issue machine"
+ :exports '[create-issue-machine!]}
(import prelude/lens :unqualified)
(import prelude/machine '[send-code! send-signed-command!] :unqualified)
@@ -10,18 +10,18 @@
(import prelude/io :as 'io)
(import prelude/key-management '[use-fake-keys! read-keys!] :unqualified)
-(def radicle-issues-machine-id
+(def radicle-issue-machine-id
"The name of this machine."
- "monadic/radicle/issues")
+ "monadic/radicle/issue")
-(def create-issues-machine!
+(def create-issue-machine!
"Create a remote issue machine with the given url."
(fn []
(def owner-keys (lookup :public-key (read-keys!)))
(def id (machine/new-machine!))
(machine/send-prelude! id)
(send-code! id (find-module-file! "monadic/issue-remote.rad"))
- (machine/send-signed-command! id radicle-issues-machine-id 'add-admin {:key owner-keys})
+ (machine/send-signed-command! id radicle-issue-machine-id 'add-admin {:key owner-keys})
id))
(def simple-issue
@@ -48,22 +48,22 @@
(def create-issue!
"Create a new remote issue with the keys in `my-keys.rad`."
(fn [machine i]
- (machine/send-signed-command! machine radicle-issues-machine-id 'create-issue i)))
+ (machine/send-signed-command! machine radicle-issue-machine-id 'create-issue i)))
(def add-comment!
"Create a remote comment with the keys in `my-keys.rad`."
(fn [machine c]
- (machine/send-signed-command! machine radicle-issues-machine-id 'add-comment c)))
+ (machine/send-signed-command! machine radicle-issue-machine-id 'add-comment c)))
(def edit-issue!
"Edit a remote issue with the keys in `my-keys.rad`."
(fn [machine i]
- (machine/send-signed-command! machine radicle-issues-machine-id 'edit-issue i)))
+ (machine/send-signed-command! machine radicle-issue-machine-id 'edit-issue i)))
(def edit-comment!
"Edit a remote comment with the keys in `my-keys.rad`."
(fn [machine c]
- (machine/send-signed-command! machine radicle-issues-machine-id 'edit-comment c)))
+ (machine/send-signed-command! machine radicle-issue-machine-id 'edit-comment c)))
(def simple-create-issue!
"Create a remote issue with sensible defaults."
@@ -134,13 +134,13 @@
(take n is)))
(:test
- "The monadic issues machine works."
+ "The monadic issue machine works."
[:setup
(do (machine/install-remote-machine-fake)
(def owner-keys (gen-key-pair! (default-ecc-curve)))
(def non-owner-keys (gen-key-pair! (default-ecc-curve)))
(set-fake-keys! owner-keys)
- (def machine (create-issues-machine!))
+ (def machine (create-issue-machine!))
(simple-create-issue! machine "title0" "body0")
(simple-create-issue! machine "title1" "body1")
(simple-add-comment! machine 0 "comment0" "name0")
diff --git a/rad/monadic/issues-upgrade.rad b/rad/monadic/issues-upgrade.rad
index 5e7c866..a0d949b 100644
--- a/rad/monadic/issues-upgrade.rad
+++ b/rad/monadic/issues-upgrade.rad
@@ -1,8 +1,8 @@
-(load! (find-module-file! "monadic/issues.rad"))
+(load! (find-module-file! "monadic/issue.rad"))
(import prelude/chain :unqualified)
-;; This is a script that migrates the issues chain. It is used when there is a
+;; This is a script that migrates the issue chain. It is used when there is a
;; breaking change.
;; Example:
;; (migrate-issues! "machines.radicle.xyz/chains/radicle-issues"
@@ -20,5 +20,5 @@
(def migrate-issues!
(fn [old new]
(def is (nth 1 (receive! old :nothing)))
- (create-issues-chain! new)
+ (create-issue-chain! new)
(send! new (filter input? is))))
diff --git a/rad/monadic/project.rad b/rad/monadic/project.rad
index 8f49ed6..573bf18 100644
--- a/rad/monadic/project.rad
+++ b/rad/monadic/project.rad
@@ -50,9 +50,9 @@
(fn [machine]
(machine/query! machine '(list-rsms))))
-(def add-issues-rsm!
+(def add-issue-rsm!
(fn [machine id]
- (add-rsm! machine { :id id :type :rad-issues })))
+ (add-rsm! machine { :id id :type :rad-issue })))
(def add-diff-rsm!
(fn [machine id]
@@ -81,13 +81,13 @@
(set-fake-keys! owner-keys)
(install-fake-clock)
(def machine (create-project! {:name "test" :description "test project"}))
- (add-issues-rsm! machine "a")
+ (add-issue-rsm! machine "a")
(add-diff-rsm! machine "b")
(add-repo-rsm! machine "c"))
]
[ (get-meta! machine) ==> { :name "test" :description "test project" }]
- [ (lookup :id (first-rsm-of-type! machine :rad-issues)) ==> "a" ]
+ [ (lookup :id (first-rsm-of-type! machine :rad-issue)) ==> "a" ]
[ (lookup :id (first-rsm-of-type! machine :rad-diff)) ==> "b" ]
[ (lookup :id (first-rsm-of-type! machine :rad-repo)) ==> "c" ]
;; authorization
diff --git a/test/all.rad b/test/all.rad
index d69f93e..05fcb8e 100755
--- a/test/all.rad
+++ b/test/all.rad
@@ -6,7 +6,7 @@
(load! (find-module-file! "tests/stub-primitives.rad"))
(load! (find-module-file! "prelude.rad"))
(load! (find-module-file! "monadic/diff.rad"))
-(load! (find-module-file! "monadic/issues.rad"))
+(load! (find-module-file! "monadic/issue.rad"))
(load! (find-module-file! "monadic/names.rad"))
(load! (find-module-file! "monadic/project.rad"))