cli: print success to console on `rad issue state`
Indicate that the `rad issue state` operation was successful to the
user by printing a message to the console.
Solves:
rad issue show 71020de8478b15b3f7a619f2f93d3cfb8771cde2
This commit is contained in:
parent
ffbdabe432
commit
f0390e00d9
|
|
@ -123,3 +123,12 @@ To publish our new state to the network, we simply push:
|
||||||
```
|
```
|
||||||
$ git 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)
|
||||||
|
```
|
||||||
|
|
|
||||||
|
|
@ -567,6 +567,17 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
|
||||||
let id = id.resolve(&repo.backend)?;
|
let id = id.resolve(&repo.backend)?;
|
||||||
let mut issue = issues.get_mut(&id)?;
|
let mut issue = issues.get_mut(&id)?;
|
||||||
issue.lifecycle(state, &signer)?;
|
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 {
|
Operation::React {
|
||||||
id,
|
id,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue