Commit Graph
161 Commits
Author SHA1 Message Date
Alexis Sellier 577a232a68 cli: Fix multiline patch show description output 2023-03-23 14:43:21 +01:00
Alexis Sellier 6c1e2d0ddd cli: Don't strip initial message from editor
This was problematic when the initial message was a valid default.
2023-03-23 14:43:21 +01:00
Alexis Sellier 63fc06c817 cli: Don't have blank line if no description
Changes `rad patch show` to not have a blank line when there is no
description.
2023-03-23 14:43:21 +01:00
Sebastian Martinez 8e3b629178 cli: Enable rad tag and rad untag for patches as well
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-03-23 11:53:11 +01:00
Vincenzo Palazzo 654a21b2b3 cli: Allow git revision parameters as COB IDs
This commit allows any git revision to be used instead
of the full SHA-1, when specifying COBs.

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-03-22 15:38:14 +01:00
Adam Szkoda b4c3bee39d cli: Add CLI commit SHA-1 to help 2023-03-22 08:52:35 +01:00
Alexis Sellier db8ec5735f cli: Use new widgets for patch list 2023-03-21 12:43:44 +01:00
Alexis Sellier ab74e54949 term: Implement new output widget system
We implement a new `Element` trait which allows for more complex output
to be drawn, such as vertical and horizontal stacks.

We adapt `Table` to work within this system.

We refresh the output of `rad patch show` to use these new tools.
2023-03-21 12:43:44 +01:00
Alexis Sellier 5ccf38079c cli: Make patch checkout fetch missing objects
Before this change, `rad patch checkout` would fail if the patch commits
were not in the working copy.
2023-03-18 12:24:17 +01:00
Alexis Sellier 8f57d60706 cli: Don't rely on working copy for patch show
Since the patch may not have been pulled into the working copy,
we shouldn't rely on it for displaying patch information.
2023-03-18 12:24:17 +01:00
Alexis Sellier cf1acf7e24 Fix patch description method
The description is not actually optional, so don't return an `Option`.
2023-03-18 12:24:17 +01:00
Alexis Sellier bd436d4369 cli: Open tracking DB in read-only mode 2023-03-15 12:59:49 +01:00
Alexis Sellier caaa7581e6 node: Remove Routing command
Replaced by direct DB access.
2023-03-15 12:59:49 +01:00
Alexis Sellier b558c742e6 node: Rename repo_entries to repo_policies
Do the same thing for `node_entries` etc.
2023-03-15 12:59:49 +01:00
Alexis Sellier 9b6ede8fc5 cli: Use tracking DB access for node command 2023-03-15 12:59:49 +01:00
Alexis Sellier 13998dcf46 cli: Flesh out rad self 2023-03-15 10:25:23 +01:00
Alexis Sellier 9c77332cba cli: Implement tag and untag
These commands are added at the top level because they will eventually
also work on patches.
2023-03-13 15:08:14 +01:00
Alexis Sellier 2737369910 cli: Fix missing patch announcement 2023-03-13 14:37:01 +01:00
Alexis Sellier f7aac06a8f cli: Polish assign and unassign commands 2023-03-13 12:27:47 +01:00
Alexis Sellier 8e5627d28a node: Rename tracked_repo -> repo_policies
I was finding the current naming misleading, as the returned entries
could be for blocked repos/nodes.
2023-03-13 11:41:07 +01:00
Vincenzo Palazzo f8aa1daedb cli: show the issue when it is created
Show the issue when it is created to give feedback to the user.

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-03-12 19:26:28 +01:00
Slack Coder 166f7e7cc2 cli: Minimize patch info on creation
Reduce noise when showing patch information to the user on creation by
only showing the git branch name and not the commit reference.
2023-03-11 18:38:54 +01:00
Alexis Sellier 34a2d1a9dc cli: use canonical head for patch target
Correct assumptions made about how patching work in `rad patch`.  Make
the default Patch target a `git ref` in place of a target 'peer'.

Use the canonical head as the git reference.  This is head of the
project's master branch which project delegates have concensus on.
2023-03-11 18:38:54 +01:00
Alexis Sellier adbf6f5bf5 cli: Improve patch command
Cleanup and simplify output of patch command.
2023-03-08 20:23:49 +01:00
Alexis Sellier 1168f2ddb5 cli: Update track command
Allows the `track` command to be used to track nodes and repos.
2023-03-08 15:32:34 +01:00
Fintan Halpenny 3b015a9325 radicle: accept Scope as track_repo argument
The method `track_repo` only accepted the RID as the argument for
tracking.

Instead, allow passing Scope as an argument for tracking a
repository.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-03-08 11:29:34 +00:00
Fintan Halpenny 39be7db1e9 radicle: make alias optional
Previously the alias field was simply a string which could possibly be
empty. Some checks were made to see if this string was empty.

Instead, make the logic more obvious by making the alias field
optional.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-03-08 11:29:34 +00:00
Vincenzo Palazzo 0e491fae79 cli: fix command line silent abort
Fix the command line silents abort when the
the `EDITOR` variable is not specified.

With this commit the result is reported below

```
➜  rio git:(main) RAD_PASSPHRASE=12345 rad issue open
✗ Issue failed: editor not configured: the `EDITOR` environment variable is not set
```

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-03-08 12:25:11 +01:00
Fintan Halpenny ed985f6fe0 cli: rad node
This adds a rad node subcommand to the CLI.

The subcommand aims to fulfill the following requirements:

- Checking the node status (rad node status)
- Connecting to the node's control socket (rad node connect)
- Printing out our routing table (rad node routing)
- Printing out our tracking policies (rad node tracking)

The following are yet to be implemented:

- Starting the node (rad node start)
- Stopping the node (rad node stop)

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-03-07 15:38:41 +01:00
Alexis Sellier 5fb5df2e61 cli: Update inquire crate 2023-03-07 10:39:45 +01:00
Alexis Sellier 85df613682 cli: Implement automatic issue announcement 2023-03-07 08:40:20 +01:00
Alexis Sellier cb3b7a3765 cli: Implement patch delete 2023-03-06 15:45:54 +01:00
Alexis Sellier fb2c388a5d cli: Properly trim patch message 2023-03-06 15:39:07 +01:00
Alexis Sellier 35f22ba37a cli: Update init help for consistency 2023-03-06 15:38:42 +01:00
Alexis Sellier be5c9c9258 cli: Add --verbose flag to init 2023-03-06 15:38:42 +01:00
Alexis Sellier c8c44c884c cli: Allow init without running node 2023-03-06 15:38:42 +01:00
Alexis Sellier e69be6051d cli: Give more control over init announcement
Instead of always announcing the inventory, by default we don't.
Users can run `rad push` to trigger an announcement.
2023-03-06 15:38:42 +01:00
Alexis Sellier 8c22012d61 Remove need to pass public key in cob store 2023-03-06 10:56:20 +01:00
Alexis Sellier 44f3984159 Sign COB refs after modification 2023-03-06 10:42:26 +01:00
Alexis Sellier 02304875ce Initialize radicle-term crate
We split out all non-radicle terminal functionality so that it can be
accessed by `radicle-node` without importing `radicle-cli`.
2023-03-06 10:22:50 +01:00
Alexis Sellier 82d858314f cli: Fix rad rm prompt 2023-03-04 22:28:45 +01:00
Slack Coder dd7e3923b5 cli: expose rad fetch
Make `rad fetch` accessible via the command line.  It appears to be
accidently left out.
2023-03-03 09:59:45 -05:00
Alexis Sellier de71c5d9b1 cli: Implement --fetch on rad patch 2023-03-02 17:00:31 +01:00
Alexis Sellier 43bd5fca00 cli: Implement rad fetch command 2023-03-02 17:00:27 +01:00
Alexis Sellier 5f59493c70 cob: Don't require a local fork to exist
Before this change, the identity document would be loaded for the
COB signer. This meant that a fork would be needed for that signer.

After this change, it's no longer necessary, since the identity doc
head is computed from available remotes.

While making those changes, it was also apparent that some of the
identity-related functions had bad names and error types, this
was fixed as well.
2023-03-01 15:40:30 +01:00
Alexis Sellier 2a687502c5 cli: Improve rad inspect
* Don't always require auth
* Fix `--refs` sub-command
2023-03-01 13:03:42 +01:00
Alexis Sellier 892f02bc43 cli: Improve rad-auth first authentication 2023-03-01 13:03:42 +01:00
Alexis Sellier e4b44370d3 cli: Register key on first auth
Registers the secret key with ssh-agent when `rad auth` is first called.
2023-03-01 13:03:42 +01:00
Alexis Sellier 68aca5dd65 cli: Don't fork if we already have a fork 2023-02-27 18:27:52 +01:00
Alexis Sellier 207030d2e1 cli: Don't fail clone if we have repo locally 2023-02-27 18:19:02 +01:00