From 757483f35139d6642ffeed657ba0f88fae512674 Mon Sep 17 00:00:00 2001 From: cloudhead Date: Wed, 21 Aug 2024 17:37:58 +0200 Subject: [PATCH] radicle: Fix patch COB `review` action When two `review` actions were posted by the same author, for the same revision, an error was returned, cancelling evaluation for that author. This caused certain patches to for eg. lose their merge status. To remedy this, we *allow* multiple `review` actions per revision, but simply take the last one as the "current" review. Since this makes the `review.edit` action redundant, we remove that action completely. This is safe, as none of the tools created review edits. --- radicle/src/cob/patch.rs | 161 +++++++++++++-------------------------- 1 file changed, 55 insertions(+), 106 deletions(-) diff --git a/radicle/src/cob/patch.rs b/radicle/src/cob/patch.rs index ea1f0072..19a1b575 100644 --- a/radicle/src/cob/patch.rs +++ b/radicle/src/cob/patch.rs @@ -1,6 +1,5 @@ pub mod cache; -use std::collections::btree_map::Entry; use std::collections::{BTreeMap, BTreeSet, HashMap}; use std::fmt; use std::ops::Deref; @@ -186,14 +185,6 @@ pub enum Action { #[serde(default, skip_serializing_if = "Vec::is_empty")] labels: Vec