Make `Operation` generic, and handle patch operations
So far we only supported issue operations on the activity_by_id
command.
With this commit we separate the commands into a activity_by_issue and
activity_by_patch command that calls a generic activity_by_id trait
implementation.
Operation now takes as a generic either cob/issue/Action.ts or
cob/patch/Action.ts.
Also Operation now stores the array of all Action that happened on
said operation. Iām not entirely sure if this will help us in the
future, but it represents more closely the state of the relation between
an Operation and the cob Actions.
š Workflow runs š Branch on GitHub
16 files changed
+218
-135
63d1c87c
ā
432db1ce
modified crates/radicle-tauri/src/commands/cob.rs
@@ -2,12 +2,10 @@ use std::path::PathBuf;
|
|
|
|
|
|
| - | |
|
|
|
|
|
|
|
|
| - | |
|
|
|
|
|
@@ -84,13 +82,3 @@ pub async fn save_embed_to_disk(
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
modified crates/radicle-tauri/src/commands/cob/issue.rs
@@ -1,8 +1,10 @@
|
|
|
|
|
|
| + | |
|
|
|
|
| + | |
|
|
|
|
|
@@ -55,3 +57,12 @@ pub(crate) fn comment_threads_by_issue_id(
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
modified crates/radicle-tauri/src/commands/cob/patch.rs
@@ -3,8 +3,10 @@ use radicle::git;
|
|
|
|
|
|
| + | |
|
|
|
|
| + | |
|
|
|
|
|
@@ -109,3 +111,12 @@ pub fn edit_patch(
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
modified crates/radicle-tauri/src/lib.rs
@@ -78,15 +78,16 @@ pub fn run() {
|
|
|
|
|
|
| - | |
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
added crates/radicle-types/bindings/cob/Operation.ts
@@ -0,0 +1,13 @@
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
deleted crates/radicle-types/bindings/cob/issue/Operation.ts
@@ -1,27 +0,0 @@
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
modified crates/radicle-types/src/cobs.rs
@@ -1,6 +1,7 @@
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -31,6 +32,21 @@ impl Author {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-types/src/cobs/issue.rs
@@ -1,6 +1,5 @@
|
|
|
|
| - | |
|
|
|
|
|
@@ -55,20 +54,6 @@ impl Issue {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
|
|
|
|
|
modified crates/radicle-types/src/error.rs
@@ -9,6 +9,10 @@ pub enum Error {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-types/src/traits/cobs.rs
@@ -2,39 +2,41 @@ use radicle::cob::object::Storage;
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
| - | |
| + | |
|
|
| - | |
| + | |
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
| - | |
| + | |
|
|
|
|
|
modified crates/test-http-api/src/api.rs
@@ -8,13 +8,14 @@ use axum::routing::post;
|
|
|
|
|
|
| - | |
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -57,7 +58,14 @@ pub fn router(ctx: Context) -> Router {
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -206,7 +214,7 @@ async fn create_issue_comment_handler(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -228,15 +236,23 @@ async fn edit_issue_handler(
|
|
|
|
|
|
| - | |
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
| - | |
| + | |
|
|
| - | |
| + | |
|
|
|
|
|
modified src/components/IssueTimelineLifecycleAction.svelte
@@ -1,5 +1,6 @@
|
|
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -8,19 +9,20 @@
|
|
|
|
|
|
| - | |
| + | |
| + | |
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
added src/components/PatchTimelineLifecycleAction.svelte
@@ -0,0 +1,28 @@
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
modified src/views/repo/Issue.svelte
@@ -1,9 +1,10 @@
|
|
| + | |
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -45,7 +46,7 @@
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -149,9 +150,8 @@
|
|
|
|
|
|
| - | |
| + | |
|
|
| - | |
|
|
|
|
|
@@ -524,26 +524,28 @@
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
| - | |
| + | |
|
|
|
|
|
modified src/views/repo/Patch.svelte
@@ -1,4 +1,6 @@
|
|
| + | |
| + | |
|
|
|
|
|
@@ -43,11 +45,13 @@
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -416,6 +420,17 @@
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified src/views/repo/router.ts
@@ -1,7 +1,9 @@
| + | |
| + | |
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -33,7 +35,7 @@ export interface LoadedRepoIssueRoute {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -82,6 +84,7 @@ export interface LoadedRepoPatchRoute {
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -117,28 +120,42 @@ export type LoadedRepoRoute =
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -194,9 +211,8 @@ export async function loadIssue(
|
|
|
|
|
|
| - | |
| + | |
|
|
| - | |
|
|
|
|
|