Commit Graph

92 Commits

Author SHA1 Message Date
Slack Coder 215abde9e6
cli: cover `rad patch update` in doc test
Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-02-06 13:49:41 +01:00
Fintan Halpenny 3f48c2c516
Rust 1.67
Rust 1.67 was announced[0]. Update the necessary files for running
1.67 and fix the clippy suggestions for string interpolation.

[0]: https://blog.rust-lang.org/2023/01/26/Rust-1.67.0.html

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-02-04 19:30:29 +01:00
Alexis Sellier f1a6a86689
node: Check refs when getting local inventory
If we don't do this, we're going to be returning broken repos.
2023-01-30 11:38:00 +01:00
Alexis Sellier b92dc59204
node: Turn off `--atomic` when not supported 2023-01-29 18:22:41 +01:00
Sebastian Martinez f07a875ce1
Add web-based authentication
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-01-27 17:23:05 +01:00
Alexis Sellier 5e955d39d0
cob: Add 'description' to `Revision`
Simplifies the code a little.
2023-01-26 17:37:58 +01:00
Alexis Sellier bb3787258a
cob: Refactor `Thread` methods 2023-01-26 16:20:22 +01:00
Alexis Sellier 30e9d6103c
Cleanup `clone` code
Remove a bunch of different instances of it.
2023-01-25 17:51:49 +01:00
Alexis Sellier 8279ef72fd
cli: Fix output of checkout command 2023-01-25 17:51:49 +01:00
Alexis Sellier fdad6358fc
cli: Correctly setup remote tracking branch
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-25 17:51:49 +01:00
Alexis Sellier 0a9bb23e4e
Replace `RAD_DEBUG` with `RAD_SEED`
The latter is strictly more powerful.
2023-01-25 17:09:16 +01:00
Alexis Sellier b1012014fe
Remove old `Profile::paths` function 2023-01-25 15:35:24 +01:00
Alexis Sellier 963ad3c3d7
Get `rad clone` working correctly 2023-01-25 11:35:20 +01:00
Alexis Sellier fd5ac7f6af
cli: Minor cleanups 2023-01-25 10:21:57 +01:00
Alexis Sellier bb135b64b3
cli: Get `rad-checkout` working properly 2023-01-24 14:54:56 +01:00
Alexis Sellier 1f06f5340f
Make `Id` to string conversion more explicit
Two types of conversion: `canonical`, which is just the base58 encoding,
and `urn` which is like canonical, but includes `rad:`.
2023-01-24 13:49:03 +01:00
Alexis Sellier b78790622f
cli: Improve test utilities
This will allow easy creation of multiple users with deterministic keys.

Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-24 10:46:57 +01:00
Slack Coder 87ff1990c0
cli: Create terminal::cob
Use a new module, `terminal::cob`, to collect collaborative object code to
improve consistency.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-01-20 13:46:02 +01:00
Slack Coder a0588460f3
cli: More informative `rad patch show`
Show entire patch commit history using `rad log --patch`.
2023-01-20 13:46:02 +01:00
Slack Coder 2295bb4ea4
cli: add `rad patch show`
Show patch information with `rad patch show`.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-01-20 13:46:02 +01:00
xphoniex 1e4cff4a0f
cli: Change `reaction` flag to `emoji`
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-01-18 18:12:59 +01:00
Slack Coder 9243b9fdeb
cli: Add minimal `rad comment`
Allow users to comment on an Issue.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-01-18 18:08:09 +01:00
Alexis Sellier be9def8b11
Rename `profile::Paths` to `profile::Home`
This makes the intent clearer.

Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-17 11:01:36 +01:00
Alexis Sellier d31968509d
Speed up node E2E tests
By allowing the node to run using a `MockSigner`, we speed up tests
significantly, since PBKDF2 doesn't need to run.

Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-17 11:01:36 +01:00
Slack Coder 592b0047a4
rad-patch: create tracking branch on push
If not tracking branch is set, create one when pushing.  This is a common
default behavior for git and avoids failing over on some installations.
2023-01-17 10:08:44 +01:00
Slack Coder 8f8eacc078
github: Workaround test dep on git remote helper
Workaround a client documentation test dependency on radicle's
radicle-remote-helper.

The framework has yet to support using the projects version directly.  A
proper fix is non-trivial.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-01-17 10:08:44 +01:00
Slack Coder 54bcb91339
cli: Allow using `git` in doc tests
Define git author name and email address, and others to allow using it
deterministically in documentation tests.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-01-17 10:08:44 +01:00
Slack Coder 284aadc37c
cli: Avoid trailing spaces on list
Use '-'s to avoid trailing spaces on items when listing patches.

The spaces are used as part of the format with colouring.  However they
are a nuisance to support in testing given the autoformatting of editors
to remove them.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-01-17 10:08:44 +01:00
Slack Coder a6d59b3c0e
cli: alter use subcommands for patch
Make `rad patch` accept subcommands for specifying its operation in
place of the '--command' notation.

For instance `rad patch update` versus `rad patch --update`.  Also make
the default operation list active patches, replacing patch creation.
Patch creation is now done via `rad patch open`.

Make these changes in a way consistent with other commands like `rad
delegate`.

Add '--no-confirm' to patch to support this subcommand's documentation
test.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-01-17 10:08:44 +01:00
xphoniex 7962ac0a8e
httpd: Add api tests
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-01-12 20:30:53 +01:00
Slack Coder 897d439f95
radicle-cli: Correct operation name
Change `OperationName::Create` to `OperationName::Open` and change the
command argument to reflect this.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-01-12 19:59:43 +01:00
Slack Coder a407c3a4f8
cli: simplify inspect
Remove redundant 'collect()' call.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-01-10 16:37:20 +01:00
Alexis Sellier a8bca9cd92
cli: Use imperative for commit message in `edit`
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-09 16:48:05 +01:00
Alexis Sellier a6066e3ac3
cli: Update `inspect` command
Fix order of iteration, and make output look more like commit log.
Also show commit parent and message.

Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-09 16:48:01 +01:00
Slack Coder 03bc9d84d6
rad-remote-helper: honor RAD_PASSPHRASE
Make testing more convenient by reducing rad-remote-helper's dependency
on SSH Agent.  It may be opted out of by setting the `RAD_PASSPHRASE`
environment variable.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-01-09 16:44:35 +01:00
Alexis Sellier e49226c500
cli: Make some changes to issue listing
* Use an `--assigned` flag
* Default to listing all issues

Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-03 18:59:13 +01:00
Alexis Sellier f193d7d6cc
Improvements to keystore
* Use the correct passphrase type everywhere
* Allow conversion of secret key
* Extract logic for storing a key in keystore

Signed-off-by: Alexis Sellier <self@cloudhead.io>
2022-12-27 13:43:16 +01:00
Alexis Sellier 9ec7a0a2ce
cli: Fix flaky tests
We were setting the CWD for the parent process, which wasn't such a good
idea.

Signed-off-by: Alexis Sellier <self@cloudhead.io>
2022-12-27 12:53:57 +01:00
Fintan Halpenny aa05f676f7
cli: add delegate cli
Adds a `rad delegate` CLI command.

The command consists of three subcommands:
* `add` -- add a new delegate to the set of delegates of a project
* `remove` -- remove an existing delegate from the set of delegates of a
  project
* `list` -- list the delegates of a project

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2022-12-27 12:25:24 +01:00
Fintan Halpenny adaed6a3ac
radicle: validated construction of Project
The `validate` method of `Project` was unused, which is problematic if
the attributes are supposed to be validated based on some
constraints. The issue is that `Project` provided public construction
of its fields with enforcing validation.

This change makes `Project`'s attributes private and introduces a
smart constructor `new` which is fallible if any of the constraints
are not met. The error type was changed to be a vector of errors since
all of these errors can be collected for better error reporting.

Deserialization also provided a way of constructing a `Project`
without ensuring any of the constraints were checked. To prevent this
a hand-rolled `Deserialize` is provided that goes through
`Project::new`.

To access the fields of `Project`, accessor functions are added and
all call sites are updated to use them.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2022-12-27 12:23:39 +01:00
Slack Coder 94be0ca392
cli: Make issue args more declarative
Avoid delegating argument parsing to issue::run().  Define the forms a
peer can take when given as an argument using an enum.  It is then used
to replace OperationName::Default, which is no longer needed, as the
commands default operation is now fully defined by the enum 'Operation'.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2022-12-26 15:53:06 +01:00
Slack Coder 61fe352ad9
cli: rad issue show
Signed-off-by: Slack Coder <slackcoder@server.ky>
2022-12-26 15:52:14 +01:00
Slack Coder 260863f571
cli: list your assigned issues via 'rad issue'
Allow listing issues for a given peer by using 'rad issue list' with an optional
argument.

For convenience, make listing your own issues easy by making it the
default operation of 'rad issue'.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2022-12-26 15:52:14 +01:00
Slack Coder 83f2f2b5a5
cli: Make terminal::Table more accepting
Make the Table type easier to use by having it accept &str over String
types as arguments.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2022-12-26 15:44:19 +01:00
Slack Coder c0590a100d
cli: Lightly document terminal::Table
Help developers by giving a small description and example for its use.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2022-12-26 15:43:47 +01:00
Slack Coder 6b67e0571e
cli: Use term::Table to print list of issues
Signed-off-by: Slack Coder <slackcoder@server.ky>
2022-12-26 15:38:39 +01:00
Slack Coder 946d6ac675
cli: assign and unassign issues
Allow assigning an issue to one or more people via a new subcommand.

    rad assign <issue> <peer>

To unassign:

    rad unassign <issue> <peer>

To support testing and documentation, create an example for maintaining
issues for a project.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2022-12-26 15:38:39 +01:00
Alexis Sellier e47d7ca2aa
cob: Implement comment edit action
This implementation intentionally preserves all edits such that
they may be displayed in an application as an edit history.

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-16 12:32:20 +01:00
Alexis Sellier f26674a5a9
Upgrade Rust to 1.66
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-15 20:55:26 +01:00
Alexis Sellier bdbf111163
Refactor identity verification
Introduces a new `DocAt` type.

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-12 15:01:47 +01:00