Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
cli: print success to console on `rad issue state`
Merged fintohaps opened 1 year ago

Indicate that the rad issue state operation was successful to the user by printing a message to the console.

Solves:

rad issue show 71020de8478b15b3f7a619f2f93d3cfb8771cde2
2 files changed +20 -0 87cb7bf5 f0390e00
modified radicle-cli/examples/workflow/5-patching-maintainer.md
@@ -123,3 +123,12 @@ To publish our new state to the network, we simply push:
```
$ git push
```
+

+
Finally, we will close the issue that was opened for this
+
patch, marking it as solved:
+

+
```
+
$ rad issue state 9037b7a --solved
+
✓ Issue 9037b7a is now solved
+
✓ Synced with 1 node(s)
+
```
modified radicle-cli/src/commands/issue.rs
@@ -515,6 +515,17 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
            let id = id.resolve(&repo.backend)?;
            let mut issue = issues.get_mut(&id)?;
            issue.lifecycle(state, &signer)?;
+
            if !options.quiet {
+
                let success =
+
                    |status| term::success!("Issue {} is now {status}", term::format::cob(&id));
+
                match state {
+
                    State::Closed { reason } => match reason {
+
                        CloseReason::Other => success("closed"),
+
                        CloseReason::Solved => success("solved"),
+
                    },
+
                    State::Open => success("open"),
+
                };
+
            }
        }
        Operation::React {
            id,