update
gest artifact update: update an artifact.struct Command
pub struct CommandUpdate an artifact.
| Field | Type | Description |
|---|---|---|
id |
String | The artifact ID or prefix. |
body |
Option<String> | Set the artifact body (markdown). |
edit |
bool | Open $EDITOR pre-filled with the current body for editing. |
metadata |
Vec<String> | Set a metadata key=value pair (repeatable; supports dot-paths and scalar inference). |
metadata_json |
Vec<String> | Merge a JSON object into metadata (repeatable; applied after –metadata pairs). |
tag |
Vec<String> | Replace all tags on the artifact (can be repeated; comma-separated values split into multiple tags). |
title |
Option<String> | Set the artifact title. |
output |
json::Flags | The output mode: normal, --json, --quiet or --raw. |
Implements FromArgMatches, Args, Debug.
Command::call
pub async fn call(&self, context: &AppContext) -> Result<(), Error>Apply title, body, metadata, and tag changes to the resolved artifact within a recorded transaction.
| Parameter | Type | Description |
|---|---|---|
context |
&AppContext | the application context: settings, store and current project |
| returns | Result<(), Error> | Ok(()) when the command succeeds, or the error that stopped it. |
Command::build_metadata
fn build_metadata(&self, existing: &Value) -> Result<Option<Value>, Error>Merge the --metadata and --metadata-json options over the artifact’s metadata.
| Parameter | Type | Description |
|---|---|---|
existing |
&Value | the artifact’s current metadata |
| returns | Result<Option<Value>, Error> | The new metadata, None when neither option is given, or Error::Argument for a bad value. |