Commit Graph
26 Commits
Author SHA1 Message Date
xphoniex 6f20e93c3c node: Introduce AliasStore trait
httpd: use the `AliasStore` trait

Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-06-02 14:48:33 +02:00
xphoniex 273a527cd7 httpd: Return alias field on merges of a patch
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-05-29 12:48:11 +02:00
xphoniex c735783246 httpd: Add author to revision of a patch
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-05-29 12:11:13 +02:00
Alexis Sellier cc7fdebb6a cob: Add reviewers field on Patch
We aren't ready to support this yet from an end-user perspective, but
we add it in the COB already to prepare.
2023-05-26 10:31:00 +02:00
Alexis Sellier 3d2e57edcc cob: Remove description from Patch
Since patches always have a "root" revision, use that revision's description
as the patch description.
2023-05-26 10:31:00 +02:00
Alexis Sellier 90cf62b027 cob: Redesign merge state
Move `merges` from `Revision` to `Patch`, and key them by actor.

This ensures that only one merge is possible per actor. We also make
sure that only one revision can be merged at a time, and signal a
conflict if more than one revision is considered merged.

Finally, we make sure that merges have the same target-branch commit
to be considered equal.
2023-05-19 18:40:46 +02:00
xphoniex 8880c49c1d httpd: Add alias field to certain routes
* `/patches`, `/issues`, `/remotes`

Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-05-16 12:40:07 +02:00
Sebastian Martinez fff45817bc Reduce pub accessors in patch and issue cob structs
Replaces pub accessors to struct fields with methods
Also creates some methods to compute necessary information

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-03-31 13:44:37 +02:00
Sebastian Martinez 8826ec4f9c httpd: Add reactions to issue and patch json
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-03-25 12:04:53 +01:00
Sebastian Martinez 5d7a2f19d6 httpd: Add patch head refs to patch output
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-03-25 11:54:09 +01:00
Sebastian Martinez fcea4aeb7d httpd: Add more revision properties to patch
For display purposes in the web client, we add with this commit the
some needed properties to the revisions in the patch endpoint.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-03-20 18:43:06 +01:00
Sebastian Martinez 3f0141b087 httpd: Add timestamp to revisions json
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-03-17 13:54:48 +01:00
Alexis Sellier 2b44ff1b55 cob: Use EntryId as the operation identifier
By introducing a small limitation: only allowing entries in the change
graph to be addressable, instead of individual operations; we
drastically simplify the CRDT implementation.

There are four advantages:

1. Op ids are just regular SHA-1s
2. There's no need for relative IDs, ops never refer to other ops within the
   same commit
3. There's no need for a nonce, since commits can't collide, and neither can op IDs
4. `OpId` can just be an alias of `EntryId`

The disadvantage of course, is that we have to be mindful of how we
create op transactions, since each transaction creates an addressable
unit. For example, we must not include multiple patch revisions in the
same transaction.
2023-03-09 17:08:56 +01:00
Sebastian Martinez 3cf1accddd Use Did in a bunch more places
Instead of showing just public keys we need to show the fully qualified
spec for a NID which is prefixed by `did🔑` While we want to maintain
`Author` and `ActorId` for internal use.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-02-16 18:01:42 +01:00
xphoniex 4a27cc3f6c Update radicle-git and radicle-surf
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-02-10 22:14:50 +01:00
Sebastian Martinez a6d120fa28 httpd: Add api::test::patch request method
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-02-10 12:17:03 +01:00
Sebastian Martinez 2335bc7ecc httpd: Add issue endpoints
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-02-06 14:14:06 +01:00
Sebastian Martinez 811b70a5cb Extract json! into api::json
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-02-04 19:42:14 +01:00
xphoniex 6d9154d427 httpd: Extract issue json response
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-02-04 13:46:26 +00:00
xphoniex 49590bc72d httpd: Add routes for patch ops
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-02-04 13:22:09 +00:00
xphoniex b28b25c00f Update radicle-surf
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-01-28 20:19:23 +01:00
xphoniex 2125128b5f httpd: Remove lastCommit in /tree for entries
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-01-25 15:35:24 +01:00
xphoniex 9d8c5f404b httpd: Clean up json.rs
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-01-25 15:35:24 +01:00
xphoniex f9e519296d httpd: Change sha1 into id
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-01-25 15:35:24 +01:00
xphoniex 24d19b69d2 httpd: change committerTime into committer.time
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-01-25 15:35:24 +01:00
Han Xu 64a933dccd httpd: Dogfood the new radicle-surf API
Signed-off-by: Han Xu <keepsimple@gmail.com>
2023-01-18 14:22:01 +01:00