Releeph (Phabricator part)

Summary: A copy of the Releeph release tool.

Test Plan: Generally, click everything at least once.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, AnhNhan

Maniphest Tasks: T2094

Differential Revision: https://secure.phabricator.com/D4932
This commit is contained in:
Edward Speyer
2013-03-15 11:28:43 +00:00
parent daed35e36c
commit 2497e5b5ed
100 changed files with 9774 additions and 4 deletions

View File

@@ -0,0 +1,45 @@
<?php
final class ReleephProjectViewController extends ReleephController {
public function processRequest() {
// Load all branches
$releeph_project = $this->getReleephProject();
$releeph_branches = id(new ReleephBranch())
->loadAllWhere('releephProjectID = %d',
$releeph_project->getID());
$path = $this->getRequest()->getRequestURI()->getPath();
$is_open_branches = strpos($path, 'closedbranches/') === false;
$view = id(new ReleephProjectView())
->setShowOpenBranches($is_open_branches)
->setUser($this->getRequest()->getUser())
->setReleephProject($releeph_project)
->setBranches($releeph_branches);
$crumbs = $this->buildApplicationCrumbs()
->addCrumb(
id(new PhabricatorCrumbView())
->setName($releeph_project->getName())
->setHref($releeph_project->getURI()));
if ($releeph_project->getIsActive()) {
$crumbs->addAction(
id(new PhabricatorMenuItemView())
->setHref($releeph_project->getURI('cutbranch'))
->setName('Cut New Branch')
->setIcon('create'));
}
return $this->buildStandardPageResponse(
array(
$crumbs,
$view,
),
array(
'title' => $releeph_project->getName().' Releeph Project'
));
}
}