Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cli: Add `--title` and `--description` edit option
✗ CI failure Yorgos Saslis committed 1 year ago
commit c86a732c154fde75caee5b574d0a8ce79532bc52
parent eb095c109b176eb9594ab5f99881bccf06213459
1 failed (1 total) View logs
1 file changed +6 -6
modified radicle-cli/src/commands/issue.rs
@@ -38,7 +38,7 @@ Usage

    rad issue [<option>...]
    rad issue delete <issue-id> [<option>...]
-
    rad issue edit <issue-id> [<option>...]
+
    rad issue edit <issue-id> [--title <title>] [--description <text>] [<option>...]
    rad issue list [--assigned <did>] [--all | --closed | --open | --solved] [<option>...]
    rad issue open [--title <title>] [--description <text>] [--label <label>] [<option>...]
    rad issue react <issue-id> [--emoji <char>] [--to <comment>] [<option>...]
@@ -222,10 +222,13 @@ impl Args for Options {
                    });
                }

-
                // Open options.
-
                Long("title") if op == Some(OperationName::Open) => {
+
                // Open/Edit options.
+
                Long("title") if op == Some(OperationName::Open) || op == Some(OperationName::Edit) => {
                    title = Some(parser.value()?.to_string_lossy().into());
                }
+
                Long("description") if op == Some(OperationName::Open) || op == Some(OperationName::Edit) => {
+
                    description = Some(parser.value()?.to_string_lossy().into());
+
                }
                Short('l') | Long("label") if matches!(op, Some(OperationName::Open)) => {
                    let val = parser.value()?;
                    let name = term::args::string(&val);
@@ -239,9 +242,6 @@ impl Args for Options {

                    assignees.push(did);
                }
-
                Long("description") if op == Some(OperationName::Open) => {
-
                    description = Some(parser.value()?.to_string_lossy().into());
-
                }

                // State options.
                Long("closed") if op == Some(OperationName::State) => {