Allow repositories to be associated with projects
Summary: Ref T4264. Ref T2628. Ref T3102. Allows you to associate repositories with projects. In the future, you'll be able to write Herald object rules against projects, use Herald fields like "Repository's projects", and search by project. Test Plan: See screenshots. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T3102, T4264, T2628 Differential Revision: https://secure.phabricator.com/D7881
This commit is contained in:
@@ -165,6 +165,16 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||
->setUser($user);
|
||||
$view->addProperty(pht('Callsign'), $repository->getCallsign());
|
||||
|
||||
$project_phids = PhabricatorEdgeQuery::loadDestinationPHIDs(
|
||||
$repository->getPHID(),
|
||||
PhabricatorEdgeConfig::TYPE_OBJECT_HAS_PROJECT);
|
||||
if ($project_phids) {
|
||||
$this->loadHandles($project_phids);
|
||||
$view->addProperty(
|
||||
pht('Projects'),
|
||||
$this->renderHandlesForPHIDs($project_phids));
|
||||
}
|
||||
|
||||
if ($repository->isHosted()) {
|
||||
$serve_off = PhabricatorRepository::SERVE_OFF;
|
||||
$callsign = $repository->getCallsign();
|
||||
|
||||
Reference in New Issue
Block a user