1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 08:42:41 +01:00

Support repository query by short name in Diffusion

Summary: See PHI432. Ref T13099. Short names never made it to the UI/API but seem stable now, so support them.

Test Plan: {F5465173}

Maniphest Tasks: T13099

Differential Revision: https://secure.phabricator.com/D19202
This commit is contained in:
epriestley 2018-03-08 10:52:35 -08:00
parent e83cfa295b
commit fc1ee20efe

View file

@ -24,6 +24,9 @@ final class PhabricatorRepositorySearchEngine
id(new PhabricatorSearchStringListField()) id(new PhabricatorSearchStringListField())
->setLabel(pht('Callsigns')) ->setLabel(pht('Callsigns'))
->setKey('callsigns'), ->setKey('callsigns'),
id(new PhabricatorSearchStringListField())
->setLabel(pht('Short Names'))
->setKey('shortNames'),
id(new PhabricatorSearchSelectField()) id(new PhabricatorSearchSelectField())
->setLabel(pht('Status')) ->setLabel(pht('Status'))
->setKey('status') ->setKey('status')
@ -51,6 +54,10 @@ final class PhabricatorRepositorySearchEngine
$query->withCallsigns($map['callsigns']); $query->withCallsigns($map['callsigns']);
} }
if ($map['shortNames']) {
$query->withSlugs($map['shortNames']);
}
if ($map['status']) { if ($map['status']) {
$status = idx($this->getStatusValues(), $map['status']); $status = idx($this->getStatusValues(), $map['status']);
if ($status) { if ($status) {