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

Remove "Project ID" from Releeph Projects

Summary:
Fixes T3660. Releeph Projects currently have an unused one-to-one mapping to Phabricator projects. This isn't consistent with other applications and has no integrations or uses. Get rid of it.

NOTE: Waiting for signoff from @legneato on T3660 before pulling the trigger here.

Test Plan: Created and edited Releeph projects. Grepped for references to project ID; there are a dozen or so but they're all either Releeph projects or Arcanist projects.

Reviewers: btrahan

Reviewed By: btrahan

CC: LegNeato, aran

Maniphest Tasks: T3660

Differential Revision: https://secure.phabricator.com/D6635
This commit is contained in:
epriestley 2013-08-14 09:00:56 -07:00
parent 296818e129
commit a84cc777c8
4 changed files with 6 additions and 17 deletions

View file

@ -0,0 +1,2 @@
ALTER TABLE {$NAMESPACE}_releeph.releeph_project
DROP projectID;

View file

@ -13,8 +13,6 @@ final class ReleephProjectEditController extends ReleephProjectController {
$project_name = $request->getStr('name',
$this->getReleephProject()->getName());
$phabricator_project_id = $request->getInt('projectID',
$this->getReleephProject()->getProjectID());
$trunk_branch = $request->getStr('trunkBranch',
$this->getReleephProject()->getTrunkBranch());
$branch_template = $request->getStr('branchTemplate');
@ -81,7 +79,6 @@ final class ReleephProjectEditController extends ReleephProjectController {
}
$project = $this->getReleephProject()
->setProjectID($phabricator_project_id)
->setTrunkBranch($trunk_branch)
->setDetail('pushers', $pusher_phids)
->setDetail('pick_failure_instructions', $pick_failure_instructions)
@ -173,12 +170,6 @@ final class ReleephProjectEditController extends ReleephProjectController {
->setLabel(pht('Releeph Project PHID'))
->setValue(
$this->getReleephProject()->getPHID()))
->appendChild(
id(new AphrontFormSelectControl())
->setLabel(pht('Phabricator Project'))
->setValue($phabricator_project_id)
->setName('projectID')
->setOptions($projects))
->appendChild(
id(new AphrontFormTextControl())
->setLabel(pht('Trunk'))

View file

@ -22,7 +22,6 @@ final class ReleephProject extends ReleephDAO
protected $isActive;
protected $createdByUserPHID;
protected $arcanistProjectID;
protected $projectID;
protected $details = array();
@ -76,13 +75,6 @@ final class ReleephProject extends ReleephDAO
}
}
public function loadPhabricatorProject() {
if ($id = $this->getProjectID()) {
return id(new PhabricatorProject())->load($id);
}
return id(new PhabricatorProject())->makeEphemeral(); // dummy
}
public function loadArcanistProject() {
return $this->loadOneRelative(
new PhabricatorRepositoryArcanistProject(),

View file

@ -1539,6 +1539,10 @@ final class PhabricatorBuiltinPatchList extends PhabricatorSQLPatchList {
'type' => 'sql',
'name' => $this->getPatchPath('20130731.releephrepoid.sql'),
),
'20130731.releephproject.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130731.releephproject.sql'),
),
);
}
}