radicle: Add `resolves` and `labels` method to `cob::patch::Revision`
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.
This commit is contained in:
parent
6598243465
commit
7c902b6905
|
|
@ -1462,6 +1462,11 @@ impl Revision {
|
||||||
&self.discussion
|
&self.discussion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Review comments resolved by this revision.
|
||||||
|
pub fn resolves(&self) -> &BTreeSet<(EntryId, CommentId)> {
|
||||||
|
&self.resolves
|
||||||
|
}
|
||||||
|
|
||||||
/// Iterate over all top-level replies.
|
/// Iterate over all top-level replies.
|
||||||
pub fn replies(&self) -> impl Iterator<Item = (&CommentId, &thread::Comment<CodeLocation>)> {
|
pub fn replies(&self) -> impl Iterator<Item = (&CommentId, &thread::Comment<CodeLocation>)> {
|
||||||
self.discussion.comments()
|
self.discussion.comments()
|
||||||
|
|
@ -1654,6 +1659,11 @@ impl Review {
|
||||||
self.comments.comments()
|
self.comments.comments()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Review labels.
|
||||||
|
pub fn labels(&self) -> impl Iterator<Item = &Label> {
|
||||||
|
self.labels.iter()
|
||||||
|
}
|
||||||
|
|
||||||
/// Review general comment.
|
/// Review general comment.
|
||||||
pub fn summary(&self) -> Option<&str> {
|
pub fn summary(&self) -> Option<&str> {
|
||||||
self.summary.as_deref()
|
self.summary.as_deref()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue