feat: configure personal pull request review indicators
This commit is contained in:
+9
-7
@@ -1,7 +1,7 @@
|
||||
//! Read-only active-repository discovery and isolated revision comparison.
|
||||
use crate::diff::{
|
||||
BlameRevision, Catalog, Category, ChangedFile, Comparison, ComparisonMode, FileStatus,
|
||||
PullRequestPage, RepoKind, Revision, RevisionTarget, line_hunks,
|
||||
PullRequestPage, PullRequestReviewState, RepoKind, Revision, RevisionTarget, line_hunks,
|
||||
};
|
||||
use std::{
|
||||
collections::{BTreeMap, BTreeSet},
|
||||
@@ -1631,12 +1631,7 @@ impl Repository {
|
||||
remote: remote.clone(),
|
||||
number: pull.number,
|
||||
},
|
||||
label: format!(
|
||||
"{}#{} {}",
|
||||
if pull.approved { "✓ " } else { " " },
|
||||
pull.number,
|
||||
pull.title
|
||||
),
|
||||
label: format!("#{} {}", pull.number, pull.title),
|
||||
description: pull.description,
|
||||
category: if pull.closed {
|
||||
Category::Closed
|
||||
@@ -1647,6 +1642,13 @@ impl Repository {
|
||||
},
|
||||
},
|
||||
pull.created_at,
|
||||
if pull.review_requested {
|
||||
PullRequestReviewState::Requested
|
||||
} else if pull.approved {
|
||||
PullRequestReviewState::Approved
|
||||
} else {
|
||||
PullRequestReviewState::None
|
||||
},
|
||||
)
|
||||
})
|
||||
.collect(),
|
||||
|
||||
Reference in New Issue
Block a user