1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-29 18:22:41 +01:00

In Differential, render status for any active Drydock repository operation, not just "Land" operations

Summary:
See PHI18. Third parties can currently define other types of Drydock operations (like "Merge Check" or "Cherry-Pick") but we won't show them in the UI.

This is a simple change which improves third-party support for now. These kinds of operations generally make sense in the upstream, but the pathways to support are longer.

Test Plan:
  - Verified that there are no other types of repository operation which we'd want to exclude in the upstream today by reviewing the "Repository Operation" subclasses.
  - Will click some buttons in production to make sure this works.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D18276
This commit is contained in:
epriestley 2017-07-25 06:50:40 -07:00
parent c217d7619c
commit 1588d3e224

View file

@ -1051,14 +1051,14 @@ final class DifferentialRevisionViewController extends DifferentialController {
return null;
}
// NOTE: The upstream currently supports only "Land" operations, but
// third parties have other operations (see PHI18). For now, we show any
// operation that exists. We'll refine this in the future.
$operations = id(new DrydockRepositoryOperationQuery())
->setViewer($viewer)
->withObjectPHIDs(array($revision->getPHID()))
->withIsDismissed(false)
->withOperationTypes(
array(
DrydockLandRepositoryOperation::OPCONST,
))
->execute();
if (!$operations) {
return null;