cli: Show alias on `rad issue` and `rad patch`
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
This commit is contained in:
parent
216f48b7f1
commit
95e3b9673d
|
|
@ -17,11 +17,11 @@ The issue is now listed under our project.
|
|||
|
||||
```
|
||||
$ rad issue list
|
||||
╭───────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ ● ID Title Author Tags Assignees Opened │
|
||||
├───────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● 2e8c1bf flux capacitor underpowered z6MknSL…StBU8Vi [ .. ] │
|
||||
╰───────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
╭───────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ ● ID Title Author Tags Assignees Opened │
|
||||
├───────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● 2e8c1bf flux capacitor underpowered z6MknSL…StBU8Vi (you) [ .. ] │
|
||||
╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
```
|
||||
|
||||
Show the issue information issue.
|
||||
|
|
@ -52,11 +52,11 @@ It will now show in the list of issues assigned to us.
|
|||
|
||||
```
|
||||
$ rad issue list --assigned
|
||||
╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ ● ID Title Author Tags Assignees Opened │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● 2e8c1bf flux capacitor underpowered z6MknSL…StBU8Vi z6MknSL…StBU8Vi [ .. ] │
|
||||
╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ ● ID Title Author Tags Assignees Opened │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● 2e8c1bf flux capacitor underpowered z6MknSL…StBU8Vi (you) z6MknSL…StBU8Vi [ .. ] │
|
||||
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
```
|
||||
|
||||
Note: this can always be undone with the `unassign` subcommand.
|
||||
|
|
|
|||
|
|
@ -16,19 +16,19 @@ We can confirm it's a draft by running `show`:
|
|||
|
||||
```
|
||||
$ rad patch show 6d7793b859860db775fd8ff1d18ffb6de2b9ca0e
|
||||
╭─────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ Title Nothing yet │
|
||||
│ Patch 6d7793b859860db775fd8ff1d18ffb6de2b9ca0e │
|
||||
│ Author did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi │
|
||||
│ Head 2a465832b5a76abe25be44a3a5d224bbd7741ba7 │
|
||||
│ Branches cloudhead/draft │
|
||||
│ Commits ahead 1, behind 0 │
|
||||
│ Status draft │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ 2a46583 Nothing to see here.. │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● opened by did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi (you) [ ... ] │
|
||||
╰─────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
╭────────────────────────────────────────────────────────────────────╮
|
||||
│ Title Nothing yet │
|
||||
│ Patch 6d7793b859860db775fd8ff1d18ffb6de2b9ca0e │
|
||||
│ Author did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi │
|
||||
│ Head 2a465832b5a76abe25be44a3a5d224bbd7741ba7 │
|
||||
│ Branches cloudhead/draft │
|
||||
│ Commits ahead 1, behind 0 │
|
||||
│ Status draft │
|
||||
├────────────────────────────────────────────────────────────────────┤
|
||||
│ 2a46583 Nothing to see here.. │
|
||||
├────────────────────────────────────────────────────────────────────┤
|
||||
│ ● opened by (you) (z6MknSL…StBU8Vi) [ ... ] │
|
||||
╰────────────────────────────────────────────────────────────────────╯
|
||||
```
|
||||
|
||||
Once the patch is ready for review, we can use the `ready` command:
|
||||
|
|
@ -39,19 +39,19 @@ $ rad patch ready 6d7793b859860db775fd8ff1d18ffb6de2b9ca0e
|
|||
|
||||
```
|
||||
$ rad patch show 6d7793b859860db775fd8ff1d18ffb6de2b9ca0e
|
||||
╭─────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ Title Nothing yet │
|
||||
│ Patch 6d7793b859860db775fd8ff1d18ffb6de2b9ca0e │
|
||||
│ Author did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi │
|
||||
│ Head 2a465832b5a76abe25be44a3a5d224bbd7741ba7 │
|
||||
│ Branches cloudhead/draft │
|
||||
│ Commits ahead 1, behind 0 │
|
||||
│ Status open │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ 2a46583 Nothing to see here.. │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● opened by did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi (you) [ ... ] │
|
||||
╰─────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
╭────────────────────────────────────────────────────────────────────╮
|
||||
│ Title Nothing yet │
|
||||
│ Patch 6d7793b859860db775fd8ff1d18ffb6de2b9ca0e │
|
||||
│ Author did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi │
|
||||
│ Head 2a465832b5a76abe25be44a3a5d224bbd7741ba7 │
|
||||
│ Branches cloudhead/draft │
|
||||
│ Commits ahead 1, behind 0 │
|
||||
│ Status open │
|
||||
├────────────────────────────────────────────────────────────────────┤
|
||||
│ 2a46583 Nothing to see here.. │
|
||||
├────────────────────────────────────────────────────────────────────┤
|
||||
│ ● opened by (you) (z6MknSL…StBU8Vi) [ ... ] │
|
||||
╰────────────────────────────────────────────────────────────────────╯
|
||||
```
|
||||
|
||||
If for whatever reason, it needed to go back into draft mode, we could use
|
||||
|
|
@ -71,5 +71,5 @@ $ rad patch show 6d7793b859860db775fd8ff1d18ffb6de2b9ca0e
|
|||
├─────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ 2a46583 Nothing to see here.. │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● opened by did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi (you) [ ... ] │
|
||||
│ ● opened by (you) (z6MknSL…StBU8Vi) [ ... ] │
|
||||
╰─────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
|
|
|
|||
|
|
@ -17,19 +17,19 @@ We can see a patch was created:
|
|||
|
||||
```
|
||||
$ rad patch show 8f0e8ec
|
||||
╭─────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ Title Add things │
|
||||
│ Patch 8f0e8ecb47a17e8f3219f33150a4092d645e4875 │
|
||||
│ Author did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi │
|
||||
│ Head 42d894a83c9c356552a57af09ccdbd5587a99045 │
|
||||
│ Branches feature/1 │
|
||||
│ Commits ahead 1, behind 0 │
|
||||
│ Status open │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ 42d894a Add things │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● opened by did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi (you) [ .. ] │
|
||||
╰─────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
╭────────────────────────────────────────────────────────────────────╮
|
||||
│ Title Add things │
|
||||
│ Patch 8f0e8ecb47a17e8f3219f33150a4092d645e4875 │
|
||||
│ Author did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi │
|
||||
│ Head 42d894a83c9c356552a57af09ccdbd5587a99045 │
|
||||
│ Branches feature/1 │
|
||||
│ Commits ahead 1, behind 0 │
|
||||
│ Status open │
|
||||
├────────────────────────────────────────────────────────────────────┤
|
||||
│ 42d894a Add things │
|
||||
├────────────────────────────────────────────────────────────────────┤
|
||||
│ ● opened by (you) (z6MknSL…StBU8Vi) [ ... ] │
|
||||
╰────────────────────────────────────────────────────────────────────╯
|
||||
```
|
||||
|
||||
If we check our local branch, we can see its upstream is set to track a remote
|
||||
|
|
@ -135,22 +135,22 @@ We can then see that the patch head has moved:
|
|||
|
||||
```
|
||||
$ rad patch show 8678aaf
|
||||
╭─────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ Title Add more things │
|
||||
│ Patch 8678aafff1d1e28430952abf431e60b87e28023c │
|
||||
│ Author did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi │
|
||||
│ Head 662843ed81e76efa69d7901fb7bdd775043015d0 │
|
||||
│ Branches feature/2 │
|
||||
│ Commits ahead 3, behind 0 │
|
||||
│ Status open │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ 662843e Improve code │
|
||||
│ b94a835 Add more things │
|
||||
│ 42d894a Add things │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● opened by did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi (you) [ ... ] │
|
||||
│ ↑ updated to 4b6618a6ccb0b406659364a70a00bb60e4cd7cf0 (662843e) [ ... ] │
|
||||
╰─────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
╭──────────────────────────────────────────────────────────────────────────────╮
|
||||
│ Title Add more things │
|
||||
│ Patch 8678aafff1d1e28430952abf431e60b87e28023c │
|
||||
│ Author did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi │
|
||||
│ Head 662843ed81e76efa69d7901fb7bdd775043015d0 │
|
||||
│ Branches feature/2 │
|
||||
│ Commits ahead 3, behind 0 │
|
||||
│ Status open │
|
||||
├──────────────────────────────────────────────────────────────────────────────┤
|
||||
│ 662843e Improve code │
|
||||
│ b94a835 Add more things │
|
||||
│ 42d894a Add things │
|
||||
├──────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● opened by (you) (z6MknSL…StBU8Vi) [ ... ] │
|
||||
│ ↑ updated to 4b6618a6ccb0b406659364a70a00bb60e4cd7cf0 (662843e) [ ... ] │
|
||||
╰──────────────────────────────────────────────────────────────────────────────╯
|
||||
```
|
||||
|
||||
And we can check that all the refs are properly updated in our repository:
|
||||
|
|
@ -212,21 +212,21 @@ That worked. We can see the new revision if we call `rad patch show`:
|
|||
|
||||
```
|
||||
$ rad patch show 8678aaf
|
||||
╭─────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ Title Add more things │
|
||||
│ Patch 8678aafff1d1e28430952abf431e60b87e28023c │
|
||||
│ Author did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi │
|
||||
│ Head 3507cd57811fe5f21f6a0a610a1ac8068b3a5d9f │
|
||||
│ Branches feature/2 │
|
||||
│ Commits ahead 3, behind 0 │
|
||||
│ Status open │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ 3507cd5 Amended commit │
|
||||
│ b94a835 Add more things │
|
||||
│ 42d894a Add things │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● opened by did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi (you) [ ... ] │
|
||||
│ ↑ updated to 4b6618a6ccb0b406659364a70a00bb60e4cd7cf0 (662843e) [ ... ] │
|
||||
│ ↑ updated to 983f2d21c9fbe91c21ddfbcd3e3d6cd13db0a944 (3507cd5) [ ... ] │
|
||||
╰─────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
╭──────────────────────────────────────────────────────────────────────────────╮
|
||||
│ Title Add more things │
|
||||
│ Patch 8678aafff1d1e28430952abf431e60b87e28023c │
|
||||
│ Author did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi │
|
||||
│ Head 3507cd57811fe5f21f6a0a610a1ac8068b3a5d9f │
|
||||
│ Branches feature/2 │
|
||||
│ Commits ahead 3, behind 0 │
|
||||
│ Status open │
|
||||
├──────────────────────────────────────────────────────────────────────────────┤
|
||||
│ 3507cd5 Amended commit │
|
||||
│ b94a835 Add more things │
|
||||
│ 42d894a Add things │
|
||||
├──────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● opened by (you) (z6MknSL…StBU8Vi) [ ... ] │
|
||||
│ ↑ updated to 4b6618a6ccb0b406659364a70a00bb60e4cd7cf0 (662843e) [ ... ] │
|
||||
│ ↑ updated to 983f2d21c9fbe91c21ddfbcd3e3d6cd13db0a944 (3507cd5) [ ... ] │
|
||||
╰──────────────────────────────────────────────────────────────────────────────╯
|
||||
```
|
||||
|
|
|
|||
|
|
@ -44,26 +44,26 @@ $ rad patch
|
|||
╭──────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ ● ID Title Author Head + - Updated │
|
||||
├──────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● de3096d Define power requirements z6MknSL…StBU8Vi (you) 3e674d1 +0 -0 [ ... ] │
|
||||
│ ● de3096d Define power requirements z6MknSL…StBU8Vi (you) 3e674d1 +0 -0 [ ... ] │
|
||||
╰──────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
```
|
||||
```
|
||||
$ rad patch show de3096d5cc422136016ac210b870bfa9d0f11481 -p
|
||||
╭─────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ Title Define power requirements │
|
||||
│ Patch de3096d5cc422136016ac210b870bfa9d0f11481 │
|
||||
│ Author did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi │
|
||||
│ Head 3e674d1a1df90807e934f9ae5da2591dd6848a33 │
|
||||
│ Branches flux-capacitor-power │
|
||||
│ Commits ahead 1, behind 0 │
|
||||
│ Status open │
|
||||
│ │
|
||||
│ See details. │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ 3e674d1 Define power requirements │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● opened by did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi (you) [ ... ]│
|
||||
╰─────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
╭────────────────────────────────────────────────────────────────────╮
|
||||
│ Title Define power requirements │
|
||||
│ Patch de3096d5cc422136016ac210b870bfa9d0f11481 │
|
||||
│ Author did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi │
|
||||
│ Head 3e674d1a1df90807e934f9ae5da2591dd6848a33 │
|
||||
│ Branches flux-capacitor-power │
|
||||
│ Commits ahead 1, behind 0 │
|
||||
│ Status open │
|
||||
│ │
|
||||
│ See details. │
|
||||
├────────────────────────────────────────────────────────────────────┤
|
||||
│ 3e674d1 Define power requirements │
|
||||
├────────────────────────────────────────────────────────────────────┤
|
||||
│ ● opened by (you) (z6MknSL…StBU8Vi) [ ... ] │
|
||||
╰────────────────────────────────────────────────────────────────────╯
|
||||
|
||||
commit 3e674d1a1df90807e934f9ae5da2591dd6848a33
|
||||
Author: radicle <radicle@localhost>
|
||||
|
|
@ -126,24 +126,24 @@ Showing the patch list now will reveal the favorable verdict:
|
|||
|
||||
```
|
||||
$ rad patch show de3096d
|
||||
╭─────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ Title Define power requirements │
|
||||
│ Patch de3096d5cc422136016ac210b870bfa9d0f11481 │
|
||||
│ Author did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi │
|
||||
│ Head 27857ec9eb04c69cacab516e8bf4b5fd36090f66 │
|
||||
│ Branches flux-capacitor-power, patch/de3096d │
|
||||
│ Commits ahead 2, behind 0 │
|
||||
│ Status open │
|
||||
│ │
|
||||
│ See details. │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ 27857ec Add README, just for the fun │
|
||||
│ 3e674d1 Define power requirements │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● opened by did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi (you) [ ... ]│
|
||||
│ ↑ updated to d00f978a43a255c7f2f9f23d39b555d103900c6d (27857ec) [ ... ]│
|
||||
│ ✓ accepted by z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi (you) [ ... ]│
|
||||
╰─────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
╭──────────────────────────────────────────────────────────────────────────────╮
|
||||
│ Title Define power requirements │
|
||||
│ Patch de3096d5cc422136016ac210b870bfa9d0f11481 │
|
||||
│ Author did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi │
|
||||
│ Head 27857ec9eb04c69cacab516e8bf4b5fd36090f66 │
|
||||
│ Branches flux-capacitor-power, patch/de3096d │
|
||||
│ Commits ahead 2, behind 0 │
|
||||
│ Status open │
|
||||
│ │
|
||||
│ See details. │
|
||||
├──────────────────────────────────────────────────────────────────────────────┤
|
||||
│ 27857ec Add README, just for the fun │
|
||||
│ 3e674d1 Define power requirements │
|
||||
├──────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● opened by (you) (z6MknSL…StBU8Vi) [ ... ] │
|
||||
│ ↑ updated to d00f978a43a255c7f2f9f23d39b555d103900c6d (27857ec) [ ... ] │
|
||||
│ ✓ accepted by (you) (z6MknSL…StBU8Vi) [ ... ] │
|
||||
╰──────────────────────────────────────────────────────────────────────────────╯
|
||||
```
|
||||
|
||||
If you make a mistake on the patch description, you can always change it!
|
||||
|
|
@ -151,22 +151,22 @@ If you make a mistake on the patch description, you can always change it!
|
|||
```
|
||||
$ rad patch edit de3096d --message "Define power requirements" --message "Add requirements file"
|
||||
$ rad patch show de3096d
|
||||
╭─────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ Title Define power requirements │
|
||||
│ Patch de3096d5cc422136016ac210b870bfa9d0f11481 │
|
||||
│ Author did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi │
|
||||
│ Head 27857ec9eb04c69cacab516e8bf4b5fd36090f66 │
|
||||
│ Branches flux-capacitor-power, patch/de3096d │
|
||||
│ Commits ahead 2, behind 0 │
|
||||
│ Status open │
|
||||
│ │
|
||||
│ Add requirements file │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ 27857ec Add README, just for the fun │
|
||||
│ 3e674d1 Define power requirements │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● opened by did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi (you) [ ... ]│
|
||||
│ ↑ updated to d00f978a43a255c7f2f9f23d39b555d103900c6d (27857ec) [ ... ]│
|
||||
│ ✓ accepted by z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi (you) [ ... ]│
|
||||
╰─────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
╭──────────────────────────────────────────────────────────────────────────────╮
|
||||
│ Title Define power requirements │
|
||||
│ Patch de3096d5cc422136016ac210b870bfa9d0f11481 │
|
||||
│ Author did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi │
|
||||
│ Head 27857ec9eb04c69cacab516e8bf4b5fd36090f66 │
|
||||
│ Branches flux-capacitor-power, patch/de3096d │
|
||||
│ Commits ahead 2, behind 0 │
|
||||
│ Status open │
|
||||
│ │
|
||||
│ Add requirements file │
|
||||
├──────────────────────────────────────────────────────────────────────────────┤
|
||||
│ 27857ec Add README, just for the fun │
|
||||
│ 3e674d1 Define power requirements │
|
||||
├──────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● opened by (you) (z6MknSL…StBU8Vi) [ ... ] │
|
||||
│ ↑ updated to d00f978a43a255c7f2f9f23d39b555d103900c6d (27857ec) [ ... ] │
|
||||
│ ✓ accepted by (you) (z6MknSL…StBU8Vi) [ ... ] │
|
||||
╰──────────────────────────────────────────────────────────────────────────────╯
|
||||
```
|
||||
|
|
|
|||
|
|
@ -17,11 +17,11 @@ The issue is now listed under our project.
|
|||
|
||||
```
|
||||
$ rad issue list
|
||||
╭───────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ ● ID Title Author Tags Assignees Opened │
|
||||
├───────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● b05e945 flux capacitor underpowered z6Mkt67…v4N1tRk [ .. ] │
|
||||
╰───────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
╭───────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ ● ID Title Author Tags Assignees Opened │
|
||||
├───────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● b05e945 flux capacitor underpowered z6Mkt67…v4N1tRk (you) [ .. ] │
|
||||
╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
```
|
||||
|
||||
Great! Now we've documented the issue for ourselves and others.
|
||||
|
|
@ -39,11 +39,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 z6Mkt67…v4N1tRk [ .. ] │
|
||||
╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ ● ID Title Author Tags Assignees Opened │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● b05e945 flux capacitor underpowered z6Mkt67…v4N1tRk (you) z6Mkt67…v4N1tRk [ .. ] │
|
||||
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
```
|
||||
|
||||
In addition, you can see that when you run `rad issue show` you are listed under the `Assignees`.
|
||||
|
|
|
|||
|
|
@ -47,21 +47,21 @@ $ rad patch
|
|||
│ ● 5f0a547 Define power requirements z6Mkt67…v4N1tRk (you) 3e674d1 +0 -0 [ ... ] │
|
||||
╰──────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
$ rad patch show 5f0a547f7a91bf002bb0542035a647fd5af134a5
|
||||
╭─────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ Title Define power requirements │
|
||||
│ Patch 5f0a547f7a91bf002bb0542035a647fd5af134a5 │
|
||||
│ Author did:key:z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk │
|
||||
│ Head 3e674d1a1df90807e934f9ae5da2591dd6848a33 │
|
||||
│ Branches flux-capacitor-power │
|
||||
│ Commits ahead 1, behind 0 │
|
||||
│ Status open │
|
||||
│ │
|
||||
│ See details. │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ 3e674d1 Define power requirements │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● opened by did:key:z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk (you) [ ... ]│
|
||||
╰─────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
╭────────────────────────────────────────────────────────────────────╮
|
||||
│ Title Define power requirements │
|
||||
│ Patch 5f0a547f7a91bf002bb0542035a647fd5af134a5 │
|
||||
│ Author did:key:z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk │
|
||||
│ Head 3e674d1a1df90807e934f9ae5da2591dd6848a33 │
|
||||
│ Branches flux-capacitor-power │
|
||||
│ Commits ahead 1, behind 0 │
|
||||
│ Status open │
|
||||
│ │
|
||||
│ See details. │
|
||||
├────────────────────────────────────────────────────────────────────┤
|
||||
│ 3e674d1 Define power requirements │
|
||||
├────────────────────────────────────────────────────────────────────┤
|
||||
│ ● opened by (you) (z6Mkt67…v4N1tRk) [ ... ] │
|
||||
╰────────────────────────────────────────────────────────────────────╯
|
||||
```
|
||||
|
||||
We can also confirm that the patch branch is in storage:
|
||||
|
|
|
|||
|
|
@ -33,22 +33,22 @@ $ git branch -r
|
|||
bob/master
|
||||
rad/master
|
||||
$ rad patch show 5f0a547
|
||||
╭───────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ Title Define power requirements │
|
||||
│ Patch 5f0a547f7a91bf002bb0542035a647fd5af134a5 │
|
||||
│ Author did:key:z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk │
|
||||
│ Head 27857ec9eb04c69cacab516e8bf4b5fd36090f66 │
|
||||
│ Commits ahead 2, behind 0 │
|
||||
│ Status open │
|
||||
│ │
|
||||
│ See details. │
|
||||
├───────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ 27857ec Add README, just for the fun │
|
||||
│ 3e674d1 Define power requirements │
|
||||
├───────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● opened by did:key:z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk [ ... ] │
|
||||
│ ↑ updated to b7e2356fb7e3981980b42603eea969851d17a40d (27857ec) [ ... ] │
|
||||
╰───────────────────────────────────────────────────────────────────────────────────╯
|
||||
╭──────────────────────────────────────────────────────────────────────────────╮
|
||||
│ Title Define power requirements │
|
||||
│ Patch 5f0a547f7a91bf002bb0542035a647fd5af134a5 │
|
||||
│ Author did:key:z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk │
|
||||
│ Head 27857ec9eb04c69cacab516e8bf4b5fd36090f66 │
|
||||
│ Commits ahead 2, behind 0 │
|
||||
│ Status open │
|
||||
│ │
|
||||
│ See details. │
|
||||
├──────────────────────────────────────────────────────────────────────────────┤
|
||||
│ 27857ec Add README, just for the fun │
|
||||
│ 3e674d1 Define power requirements │
|
||||
├──────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● opened by bob (z6Mkt67…v4N1tRk) [ ... ] │
|
||||
│ ↑ updated to b7e2356fb7e3981980b42603eea969851d17a40d (27857ec) [ ... ] │
|
||||
╰──────────────────────────────────────────────────────────────────────────────╯
|
||||
```
|
||||
|
||||
Wait! There's a mistake. The REQUIREMENTS should be a markdown file. Let's
|
||||
|
|
@ -93,26 +93,26 @@ The patch is now merged and closed :).
|
|||
|
||||
```
|
||||
$ rad patch show 5f0a547
|
||||
╭─────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ Title Define power requirements │
|
||||
│ Patch 5f0a547f7a91bf002bb0542035a647fd5af134a5 │
|
||||
│ Author did:key:z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk │
|
||||
│ Head f6484e0f43e48a8983b9b39bf9bd4cd889f1d520 │
|
||||
│ Branches flux-capacitor-power, master │
|
||||
│ Commits ahead 3, behind 0 │
|
||||
│ Status merged │
|
||||
│ │
|
||||
│ See details. │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ f6484e0 fixup! Define power requirements │
|
||||
│ 27857ec Add README, just for the fun │
|
||||
│ 3e674d1 Define power requirements │
|
||||
├─────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● opened by did:key:z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk [ ... ] │
|
||||
│ ↑ updated to b7e2356fb7e3981980b42603eea969851d17a40d (27857ec) [ ... ] │
|
||||
│ ↑ updated to 4486280d0dec743d6a1a0c05754f8e40426c681d (f6484e0) [ ... ] │
|
||||
│ ✓ merged by did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi (you) [ ... ] │
|
||||
╰─────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
╭──────────────────────────────────────────────────────────────────────────────╮
|
||||
│ Title Define power requirements │
|
||||
│ Patch 5f0a547f7a91bf002bb0542035a647fd5af134a5 │
|
||||
│ Author did:key:z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk │
|
||||
│ Head f6484e0f43e48a8983b9b39bf9bd4cd889f1d520 │
|
||||
│ Branches flux-capacitor-power, master │
|
||||
│ Commits ahead 3, behind 0 │
|
||||
│ Status merged │
|
||||
│ │
|
||||
│ See details. │
|
||||
├──────────────────────────────────────────────────────────────────────────────┤
|
||||
│ f6484e0 fixup! Define power requirements │
|
||||
│ 27857ec Add README, just for the fun │
|
||||
│ 3e674d1 Define power requirements │
|
||||
├──────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ● opened by bob (z6Mkt67…v4N1tRk) [ ... ] │
|
||||
│ ↑ updated to b7e2356fb7e3981980b42603eea969851d17a40d (27857ec) [ ... ] │
|
||||
│ ↑ updated to 4486280d0dec743d6a1a0c05754f8e40426c681d (f6484e0) [ ... ] │
|
||||
│ ✓ merged by (you) (z6MknSL…StBU8Vi) [ ... ] │
|
||||
╰──────────────────────────────────────────────────────────────────────────────╯
|
||||
```
|
||||
|
||||
To publish our new state to the network, we simply push:
|
||||
|
|
|
|||
|
|
@ -312,6 +312,8 @@ fn list(
|
|||
profile: &profile::Profile,
|
||||
assigned: &Option<Assigned>,
|
||||
) -> anyhow::Result<()> {
|
||||
let me = *profile.id();
|
||||
|
||||
if issues.is_empty()? {
|
||||
term::print(term::format::italic("Nothing to show."));
|
||||
return Ok(());
|
||||
|
|
@ -347,22 +349,35 @@ fn list(
|
|||
term::format::bold(String::from("ID")),
|
||||
term::format::bold(String::from("Title")),
|
||||
term::format::bold(String::from("Author")),
|
||||
term::format::bold(String::new()),
|
||||
term::format::bold(String::from("Tags")),
|
||||
term::format::bold(String::from("Assignees")),
|
||||
term::format::bold(String::from("Opened")),
|
||||
]);
|
||||
t.divider();
|
||||
|
||||
let store = profile.tracking()?;
|
||||
|
||||
for (id, issue) in all {
|
||||
let assigned: String = issue
|
||||
.assigned()
|
||||
.map(|p| term::format::did(&p).to_string())
|
||||
.map(|ref p| {
|
||||
if let Ok(Some(alias)) = store.node_policy(p).map(|node| node.and_then(|n| n.alias))
|
||||
{
|
||||
format!("{alias} ({})", term::format::did(p))
|
||||
} else {
|
||||
term::format::did(p).to_string()
|
||||
}
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
.join(", ");
|
||||
|
||||
let mut tags = issue.tags().map(|t| t.to_string()).collect::<Vec<_>>();
|
||||
tags.sort();
|
||||
|
||||
let author = issue.author().id;
|
||||
let alias = store.node_policy(&author)?.and_then(|node| node.alias);
|
||||
|
||||
t.push([
|
||||
match issue.state() {
|
||||
State::Open => term::format::positive("●").into(),
|
||||
|
|
@ -371,6 +386,13 @@ fn list(
|
|||
term::format::tertiary(term::format::cob(&id)).to_owned(),
|
||||
term::format::default(issue.title().to_owned()),
|
||||
term::format::did(&issue.author().id).dim(),
|
||||
if author.as_key() == &me {
|
||||
term::format::primary("(you)".to_owned())
|
||||
} else if let Some(alias) = alias {
|
||||
term::format::primary(alias)
|
||||
} else {
|
||||
term::format::default(String::new())
|
||||
},
|
||||
term::format::secondary(tags.join(", ")),
|
||||
if assigned.is_empty() {
|
||||
term::format::dim(String::default())
|
||||
|
|
@ -381,7 +403,6 @@ fn list(
|
|||
]);
|
||||
}
|
||||
t.print();
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,9 +66,13 @@ pub fn run(
|
|||
is_me.then(by_rev_time).then(by_id)
|
||||
});
|
||||
|
||||
let store = profile.tracking()?;
|
||||
|
||||
let mut errors = Vec::new();
|
||||
for (id, patch) in &mut all {
|
||||
match row(&me, id, patch, repository) {
|
||||
let author_id = patch.author().id();
|
||||
let alias = store.node_policy(author_id)?.and_then(|node| node.alias);
|
||||
match row(&me, alias, id, patch, repository) {
|
||||
Ok(r) => table.push(r),
|
||||
Err(e) => errors.push((patch.title(), id, e.to_string())),
|
||||
}
|
||||
|
|
@ -90,6 +94,7 @@ pub fn run(
|
|||
/// Patch row.
|
||||
pub fn row(
|
||||
whoami: &PublicKey,
|
||||
alias: Option<String>,
|
||||
id: &PatchId,
|
||||
patch: &Patch,
|
||||
repository: &Repository,
|
||||
|
|
@ -113,6 +118,8 @@ pub fn row(
|
|||
term::format::did(&author).dim().into(),
|
||||
if author.as_key() == whoami {
|
||||
term::format::primary("(you)".to_owned()).into()
|
||||
} else if let Some(alias) = alias {
|
||||
term::format::primary(alias).into()
|
||||
} else {
|
||||
term::format::default(String::new()).into()
|
||||
},
|
||||
|
|
@ -132,22 +139,39 @@ pub fn row(
|
|||
}
|
||||
|
||||
pub fn timeline(
|
||||
whoami: &PublicKey,
|
||||
profile: &Profile,
|
||||
patch_id: &PatchId,
|
||||
patch: &Patch,
|
||||
repository: &Repository,
|
||||
) -> anyhow::Result<Vec<term::Line>> {
|
||||
let you = patch.author().id().as_key() == whoami;
|
||||
let whoami = profile.id();
|
||||
let store = profile.tracking()?;
|
||||
let alias = if patch.author().id().as_key() == whoami {
|
||||
Some("(you)".to_string())
|
||||
} else {
|
||||
store
|
||||
.node_policy(patch.author().id())?
|
||||
.and_then(|node| node.alias)
|
||||
};
|
||||
|
||||
let mut open = term::Line::spaced([
|
||||
term::format::positive("●").into(),
|
||||
term::format::default("opened by").into(),
|
||||
term::format::tertiary(patch.author().id()).into(),
|
||||
]);
|
||||
|
||||
if you {
|
||||
open.push(term::Label::space());
|
||||
|
||||
if let Some(ref alias) = alias {
|
||||
open.push(term::format::primary(alias));
|
||||
open.push(term::Label::space());
|
||||
open.push(term::format::primary("(you)"));
|
||||
open.push(term::format::tertiary(format!(
|
||||
"({})",
|
||||
term::format::node(patch.author().id())
|
||||
)));
|
||||
} else {
|
||||
open.push(term::format::tertiary(patch.author().id()));
|
||||
}
|
||||
|
||||
let mut timeline = vec![(patch.timestamp(), open)];
|
||||
|
||||
for (revision_id, revision) in patch.revisions() {
|
||||
|
|
@ -172,11 +196,11 @@ pub fn timeline(
|
|||
|
||||
for (nid, merge) in patch.merges().filter(|(_, m)| m.revision == *revision_id) {
|
||||
let peer = repository.remote(nid)?;
|
||||
let mut badges = Vec::new();
|
||||
|
||||
if peer.id == *whoami {
|
||||
badges.push(term::format::primary("(you)").into());
|
||||
}
|
||||
let alias = if peer.id == *whoami {
|
||||
Some("(you)".to_string())
|
||||
} else {
|
||||
store.node_policy(&peer.id)?.and_then(|node| node.alias)
|
||||
};
|
||||
|
||||
timeline.push((
|
||||
merge.timestamp,
|
||||
|
|
@ -185,10 +209,22 @@ pub fn timeline(
|
|||
term::format::primary("✓").bold().into(),
|
||||
term::format::default("merged").into(),
|
||||
term::format::default("by").into(),
|
||||
term::format::tertiary(Did::from(peer.id)).into(),
|
||||
if let Some(ref alias) = alias {
|
||||
term::format::primary(alias).into()
|
||||
} else {
|
||||
term::format::default(String::new()).into()
|
||||
},
|
||||
if alias.is_some() {
|
||||
term::format::tertiary(format!(
|
||||
"({})",
|
||||
term::format::node(&Did::from(peer.id))
|
||||
))
|
||||
.into()
|
||||
} else {
|
||||
term::format::tertiary(Did::from(peer.id)).into()
|
||||
},
|
||||
]
|
||||
.into_iter()
|
||||
.chain(badges),
|
||||
.into_iter(),
|
||||
),
|
||||
));
|
||||
}
|
||||
|
|
@ -205,11 +241,11 @@ pub fn timeline(
|
|||
None => term::format::default("reviewed"),
|
||||
};
|
||||
let peer = repository.remote(reviewer)?;
|
||||
let mut badges = Vec::new();
|
||||
|
||||
if peer.id == *whoami {
|
||||
badges.push(term::format::primary("(you)").into());
|
||||
}
|
||||
let alias = if peer.id == *whoami {
|
||||
Some("(you)".to_string())
|
||||
} else {
|
||||
store.node_policy(&peer.id)?.and_then(|node| node.alias)
|
||||
};
|
||||
|
||||
timeline.push((
|
||||
review.timestamp(),
|
||||
|
|
@ -218,10 +254,22 @@ pub fn timeline(
|
|||
verdict_symbol.into(),
|
||||
verdict_verb.into(),
|
||||
term::format::default("by").into(),
|
||||
term::format::tertiary(reviewer).into(),
|
||||
if let Some(ref alias) = alias {
|
||||
term::format::primary(alias).into()
|
||||
} else {
|
||||
term::format::default(String::new()).into()
|
||||
},
|
||||
if alias.is_some() {
|
||||
term::format::tertiary(format!(
|
||||
"({})",
|
||||
term::format::node(&Did::from(reviewer))
|
||||
))
|
||||
.into()
|
||||
} else {
|
||||
term::format::tertiary(Did::from(reviewer)).into()
|
||||
},
|
||||
]
|
||||
.into_iter()
|
||||
.chain(badges),
|
||||
.into_iter(),
|
||||
),
|
||||
));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ pub fn run(
|
|||
.children(commits.into_iter().map(|l| l.boxed()))
|
||||
.divider();
|
||||
|
||||
for line in list::timeline(profile.id(), patch_id, &patch, stored)? {
|
||||
for line in list::timeline(profile, patch_id, &patch, stored)? {
|
||||
widget.push(line);
|
||||
}
|
||||
widget.print();
|
||||
|
|
|
|||
|
|
@ -733,7 +733,7 @@ async fn patches_handler(
|
|||
.all()?
|
||||
.filter_map(|r| {
|
||||
let (id, patch, clock) = r.ok()?;
|
||||
(state.matches(&patch.state())).then_some((id, patch, clock))
|
||||
(state.matches(patch.state())).then_some((id, patch, clock))
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
patches.sort_by(|(_, a, _), (_, b, _)| b.timestamp().cmp(&a.timestamp()));
|
||||
|
|
|
|||
|
|
@ -18,7 +18,9 @@ use radicle::git;
|
|||
use radicle::git::refname;
|
||||
use radicle::identity::Id;
|
||||
use radicle::node::routing::Store;
|
||||
use radicle::node::tracking::store as TrackingStore;
|
||||
use radicle::node::Handle as _;
|
||||
use radicle::node::TRACKING_DB_FILE;
|
||||
use radicle::profile::Home;
|
||||
use radicle::profile::Profile;
|
||||
use radicle::rad;
|
||||
|
|
@ -74,6 +76,8 @@ impl Environment {
|
|||
pub fn node(&mut self, name: &str) -> Node<MemorySigner> {
|
||||
let profile = self.profile(name);
|
||||
let signer = MemorySigner::load(&profile.keystore, "radicle".to_owned().into()).unwrap();
|
||||
let tracking_db = profile.home.node().join(TRACKING_DB_FILE);
|
||||
TrackingStore::Config::open(tracking_db).unwrap();
|
||||
|
||||
Node {
|
||||
id: *profile.id(),
|
||||
|
|
@ -90,6 +94,8 @@ impl Environment {
|
|||
let storage = Storage::open(home.storage()).unwrap();
|
||||
let keystore = Keystore::new(&home.keys());
|
||||
let keypair = KeyPair::from_seed(Seed::from([!(self.users as u8); 32]));
|
||||
let tracking_db = home.node().join(TRACKING_DB_FILE);
|
||||
TrackingStore::Config::open(tracking_db).unwrap();
|
||||
|
||||
transport::local::register(storage.clone());
|
||||
keystore
|
||||
|
|
|
|||
Loading…
Reference in New Issue