mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 05:12:41 +01:00
Enable filtering for committed revisions
Summary: engineers requested to supporting filtering by 'committed' revisions, and I think it makes sense. Test Plan: verified that all the three options worked Reviewers: epriestley, btrahan, nh Reviewed By: nh CC: nh, wolffiex, aran Differential Revision: https://secure.phabricator.com/D1383
This commit is contained in:
parent
bfbe6ec594
commit
cf35a640ec
2 changed files with 12 additions and 0 deletions
|
@ -316,6 +316,7 @@ class DifferentialRevisionListController extends DifferentialController {
|
|||
array(
|
||||
'all' => 'All',
|
||||
'open' => 'Open',
|
||||
'committed' => 'Committed',
|
||||
),
|
||||
$params['status'],
|
||||
$uri,
|
||||
|
@ -348,6 +349,8 @@ class DifferentialRevisionListController extends DifferentialController {
|
|||
case 'status':
|
||||
if ($params['status'] == 'open') {
|
||||
$query->withStatus(DifferentialRevisionQuery::STATUS_OPEN);
|
||||
} elseif ($params['status'] == 'committed') {
|
||||
$query->withStatus(DifferentialRevisionQuery::STATUS_COMMITTED);
|
||||
}
|
||||
break;
|
||||
case 'order':
|
||||
|
|
|
@ -37,6 +37,7 @@ final class DifferentialRevisionQuery {
|
|||
private $status = 'status-any';
|
||||
const STATUS_ANY = 'status-any';
|
||||
const STATUS_OPEN = 'status-open';
|
||||
const STATUS_COMMITTED = 'status-committed';
|
||||
|
||||
private $authors = array();
|
||||
private $ccs = array();
|
||||
|
@ -593,6 +594,14 @@ final class DifferentialRevisionQuery {
|
|||
ArcanistDifferentialRevisionStatus::ACCEPTED,
|
||||
));
|
||||
break;
|
||||
case self::STATUS_COMMITTED:
|
||||
$where[] = qsprintf(
|
||||
$conn_r,
|
||||
'status IN (%Ld)',
|
||||
array(
|
||||
ArcanistDifferentialRevisionStatus::COMMITTED,
|
||||
));
|
||||
break;
|
||||
default:
|
||||
throw new Exception(
|
||||
"Unknown revision status filter constant '{$this->status}'!");
|
||||
|
|
Loading…
Reference in a new issue