Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
cli: add `--title` and `--description` options to `rad issue edit`
Merged yorgos-laptop opened 1 year ago

These were missing, causing an invalid option error.

Signed-off-by: Yorgos Saslis yorgos.work@proton.me

1 file changed +6 -6 87cb7bf5 a1cd0e2f
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) => {