Skip to content

A peer-to-peer stack for code collaboration

Improve help texts of the diff, issue & create-keys app (#476)

Merle Breitkreuza139628d074d
diff --git a/bin/rad-create-keys b/bin/rad-create-keys
index c8c2002..7fa0a3b 100755
--- a/bin/rad-create-keys
+++ b/bin/rad-create-keys
@@ -5,16 +5,20 @@
(import prelude/key-management :as 'key-mgmt)
(def help
- "rad-create-keys - Radicle Key Management CLI
+ "rad create-keys - Radicle Key Management CLI
Usage:
- rad-create-keys [--force]
- rad-create-keys help
+ rad create-keys [--force]
+ rad create-keys help
- Create a new key pair with `rad-create-keys`. If `--force` is appended, an
+ Create a new key pair with `rad create-keys`. If `--force` is appended, an
existing key pair file will be overwritten.
Per default, key pairs are stored in `$HOME/.config/radicle/my-keys.rad`
- this can be adjusted by setting `$XDG_CONFIG_HOME`.")
+ this can be adjusted by setting `$XDG_CONFIG_HOME`.
+
+ The key pair is used for signing actions in the apps. Note that some actions
+ are restricted to certain key pairs so deleting or overwriting your key pair
+ can lead to loss of some authorisations.")
(def make-keys
(fn []
diff --git a/bin/rad-diff b/bin/rad-diff
index 651aaa0..e13c33e 100755
--- a/bin/rad-diff
+++ b/bin/rad-diff
@@ -22,22 +22,35 @@
(def help
(string-append
- "rad-diff - Radicle Diff CLI
+ "rad diff - Radicle Diff CLI
Usage:
- rad-diff list " list-opts-help "
- rad-diff propose <commit>
- rad-diff [retract | accept | reject | show] <diff-no>
- rad-diff comment <diff-no> <comment>
- rad-diff help
-
- list - Select from diffs to view or comment on
- propose - Create a new diff in $EDITOR
+ rad diff list " list-opts-help "
+ rad diff propose <commit>
+ rad diff [show | retract | accept | reject] <diff-number>
+ rad diff comment <diff-number> <comment>
+ rad diff help
+
+ list - Lists all diffs
+ The list can be filtered by state:
+ " (string/intercalate ", " valid-states) "
+ The flags for filtering by state:
+ " (string/intercalate ", " status-opts) "
+ Filtering by multiple states is possible via '-s <state1> -s
+ <state2> ...'.
+ If the option '--fancy' is appended, the list is opened via
+ fzf (note that fzf has to be installed).
+ propose - Create a new diff from a single commit
show - Show a diff
- comment - Shortcut for adding a comment
+ comment - Add a comment to a diff
retract - Retract your own diff
+ This command is restricted to the creator of the diff or the
+ maintainer of the project.
accept - Accept a diff
+ Automatically merges to master and pushes to origin. This
+ command is restricted to the maintainer of the project.
reject - Reject a diff
+ This command is restricted to the maintainer of the project.
help - Print this help and exit
"))
@@ -368,12 +381,12 @@
(match args
(/list-cmd 'options) (list-items (machine-name) options)
(/cmd-1 "propose" 'commit help) (new-diff! (machine-name) commit)
- (/cmd-1 "checkout" 'diff-no help) (checkout-diff! (machine-name) (read diff-no))
- (/cmd-1 "show" 'diff-no help) (show-diff! (machine-name) (read diff-no))
- (/cmd-1 "retract" 'diff-no help) (edit-diff-state! (machine-name) (read diff-no) :retracted)
- (/cmd-1 "accept" 'diff-no help) (edit-diff-state! (machine-name) (read diff-no) :accepted)
- (/cmd-1 "reject" 'diff-no help) (edit-diff-state! (machine-name) (read diff-no) :rejected)
- ["comment" 'diff-no 'comment] (create-comment! (machine-name) (read diff-no) comment)
+ (/cmd-1 "checkout" 'diff-number help) (checkout-diff! (machine-name) (read diff-number))
+ (/cmd-1 "show" 'diff-number help) (show-diff! (machine-name) (read diff-number))
+ (/cmd-1 "retract" 'diff-number help) (edit-diff-state! (machine-name) (read diff-number) :retracted)
+ (/cmd-1 "accept" 'diff-number help) (edit-diff-state! (machine-name) (read diff-number) :accepted)
+ (/cmd-1 "reject" 'diff-number help) (edit-diff-state! (machine-name) (read diff-number) :rejected)
+ ["comment" 'diff-number 'comment] (create-comment! (machine-name) (read diff-number) comment)
(/cmd-0 "create-machine" help) (new-diff-machine! (machine-name))
["help"] (put-str! help)
["-h"] (put-str! help)
diff --git a/bin/rad-issue b/bin/rad-issue
index 5d13338..b77bff8 100755
--- a/bin/rad-issue
+++ b/bin/rad-issue
@@ -22,22 +22,31 @@
(def help
(string-append
- "rad-issue - Radicle issue CLI
+ "rad issue - Radicle Issue CLI
Usage:
- 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
+ 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 - Lists all issues
+ The list can be filtered by state:
+ " (string/intercalate ", " valid-states) "
+ The flags for filtering by state:
+ " (string/intercalate ", " status-opts) "
+ Filtering by multiple states is possible via '-s <state1> -s
+ <state2> ...'.
+ If the option '--fancy' is appended, the list is opened via
+ fzf (note that fzf has to be installed).
new - Create a new issue in $EDITOR
show - Show an issue
+ comment - Add a comment to an issue
close - Close an issue
- comment - Shortcut for adding a comment
+ This command is restricted to the maintainer of the project.
help - Print this help and exit
- "))
+ "))
(def cmd-parse-failure
(fn [error]