Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
radicle: Add `resolves` and `labels` method to `cob::patch::Revision`
Merged did:key:z6MkkfM3...sVz5 opened 1 year ago

To be able to query the BTreeSet that shows which comments are resolved by a specific revision and the Iterator of Label we require some methods to obtain them.

1 file changed +10 -0 87cb7bf5 7c902b69
modified radicle/src/cob/patch.rs
@@ -1408,6 +1408,11 @@ impl Revision {
        &self.discussion
    }

+
    /// Review comments resolved by this revision.
+
    pub fn resolves(&self) -> &BTreeSet<(EntryId, CommentId)> {
+
        &self.resolves
+
    }
+

    /// Iterate over all top-level replies.
    pub fn replies(&self) -> impl Iterator<Item = (&CommentId, &thread::Comment<CodeLocation>)> {
        self.discussion.comments()
@@ -1610,6 +1615,11 @@ impl Review {
        self.comments.comments()
    }

+
    /// Review labels.
+
    pub fn labels(&self) -> impl Iterator<Item = &Label> {
+
        self.labels.iter()
+
    }
+

    /// Review general comment.
    pub fn summary(&self) -> Option<&str> {
        self.summary.as_deref()