From 329ccbb304967dbdb440c69f3a7ffa5d3f0e83a8 Mon Sep 17 00:00:00 2001 From: xphoniex Date: Wed, 28 Jun 2023 17:25:48 +0000 Subject: [PATCH] cli: Add alias and check `rad patch` & `rad issue` Signed-off-by: xphoniex --- radicle-cli/examples/workflow/3-issues.md | 20 +++++++++---------- .../workflow/4-patching-contributor.md | 12 +++++------ radicle-cli/tests/commands.rs | 5 ++++- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/radicle-cli/examples/workflow/3-issues.md b/radicle-cli/examples/workflow/3-issues.md index cf317437..b93a5426 100644 --- a/radicle-cli/examples/workflow/3-issues.md +++ b/radicle-cli/examples/workflow/3-issues.md @@ -18,11 +18,11 @@ The issue is now listed under our project. ``` $ rad issue list -╭───────────────────────────────────────────────────────────────────────────────────────────────────────╮ -│ ● ID Title Author Tags Assignees Opened │ -├───────────────────────────────────────────────────────────────────────────────────────────────────────┤ -│ ● b05e945 flux capacitor underpowered z6Mkt67…v4N1tRk (you) [ .. ] │ -╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭───────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ ● ID Title Author Tags Assignees Opened │ +├───────────────────────────────────────────────────────────────────────────────────────────────────────────┤ +│ ● b05e945 flux capacitor underpowered z6Mkt67…v4N1tRk bob (you) [ .. ] │ +╰───────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ``` Great! Now we've documented the issue for ourselves and others. @@ -40,11 +40,11 @@ It will now show in the list of issues assigned to us. ``` $ rad issue list --assigned -╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ -│ ● ID Title Author Tags Assignees Opened │ -├─────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ -│ ● b05e945 flux capacitor underpowered z6Mkt67…v4N1tRk (you) z6Mkt67…v4N1tRk [ .. ] │ -╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ ● ID Title Author Tags Assignees Opened │ +├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ +│ ● b05e945 flux capacitor underpowered z6Mkt67…v4N1tRk bob (you) bob (z6Mkt67…v4N1tRk) [ .. ] │ +╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ``` In addition, you can see that when you run `rad issue show` you are listed under the `Assignees`. diff --git a/radicle-cli/examples/workflow/4-patching-contributor.md b/radicle-cli/examples/workflow/4-patching-contributor.md index e86378ac..ac7f39ea 100644 --- a/radicle-cli/examples/workflow/4-patching-contributor.md +++ b/radicle-cli/examples/workflow/4-patching-contributor.md @@ -35,11 +35,11 @@ It will now be listed as one of the project's open patches. ``` $ rad patch -╭──────────────────────────────────────────────────────────────────────────────────────────────╮ -│ ● ID Title Author Head + - Updated │ -├──────────────────────────────────────────────────────────────────────────────────────────────┤ -│ ● 50e29a1 Define power requirements z6Mkt67…v4N1tRk (you) 3e674d1 +0 -0 [ ... ] │ -╰──────────────────────────────────────────────────────────────────────────────────────────────╯ +╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ ● ID Title Author Head + - Updated │ +├──────────────────────────────────────────────────────────────────────────────────────────────────┤ +│ ● 50e29a1 Define power requirements z6Mkt67…v4N1tRk bob (you) 3e674d1 +0 -0 [ ... ] │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ $ rad patch show 50e29a111972f3b7d2123c5057de5bdf09bc7b1c ╭────────────────────────────────────────────────────────────────────╮ │ Title Define power requirements │ @@ -54,7 +54,7 @@ $ rad patch show 50e29a111972f3b7d2123c5057de5bdf09bc7b1c ├────────────────────────────────────────────────────────────────────┤ │ 3e674d1 Define power requirements │ ├────────────────────────────────────────────────────────────────────┤ -│ ● opened by (you) [ ... ] │ +│ ● opened by bob (you) [ ... ] │ ╰────────────────────────────────────────────────────────────────────╯ ``` diff --git a/radicle-cli/tests/commands.rs b/radicle-cli/tests/commands.rs index 81b05e21..4ed71015 100644 --- a/radicle-cli/tests/commands.rs +++ b/radicle-cli/tests/commands.rs @@ -1031,7 +1031,10 @@ fn rad_workflow() { .unwrap(); let alice = alice.spawn(Config::default()); - let mut bob = bob.spawn(Config::default()); + let mut bob = bob.spawn(Config { + alias: Some("bob".to_string()), + ..Default::default() + }); bob.connect(&alice).converge([&alice]);