Show yellow "draft" bubble in Audit
Summary: Fixes T6660. Uses the new stuff in Audit to build an EditEngine-aware icon.
Test Plan: {F2364304}
Reviewers: chad
Reviewed By: chad
Maniphest Tasks: T6660
Differential Revision: https://secure.phabricator.com/D17208
This commit is contained in:
@@ -22,6 +22,7 @@ final class DiffusionCommitQuery
|
||||
private $importing;
|
||||
|
||||
private $needCommitData;
|
||||
private $needDrafts;
|
||||
|
||||
public function withIDs(array $ids) {
|
||||
$this->ids = $ids;
|
||||
@@ -98,6 +99,11 @@ final class DiffusionCommitQuery
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function needDrafts($need) {
|
||||
$this->needDrafts = $need;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function needAuditRequests($need) {
|
||||
$this->needAuditRequests = $need;
|
||||
return $this;
|
||||
@@ -239,6 +245,8 @@ final class DiffusionCommitQuery
|
||||
}
|
||||
|
||||
protected function didFilterPage(array $commits) {
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
if ($this->needCommitData) {
|
||||
$data = id(new PhabricatorRepositoryCommitData())->loadAllWhere(
|
||||
'commitID in (%Ld)',
|
||||
@@ -268,6 +276,12 @@ final class DiffusionCommitQuery
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->needDrafts) {
|
||||
PhabricatorDraftEngine::attachDrafts(
|
||||
$viewer,
|
||||
$commits);
|
||||
}
|
||||
|
||||
return $commits;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user