@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator

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

+6 -17
+2
resources/sql/patches/20130731.releephproject.sql
··· 1 + ALTER TABLE {$NAMESPACE}_releeph.releeph_project 2 + DROP projectID;
-9
src/applications/releeph/controller/project/ReleephProjectEditController.php
··· 13 13 $project_name = $request->getStr('name', 14 14 $this->getReleephProject()->getName()); 15 15 16 - $phabricator_project_id = $request->getInt('projectID', 17 - $this->getReleephProject()->getProjectID()); 18 16 $trunk_branch = $request->getStr('trunkBranch', 19 17 $this->getReleephProject()->getTrunkBranch()); 20 18 $branch_template = $request->getStr('branchTemplate'); ··· 81 79 } 82 80 83 81 $project = $this->getReleephProject() 84 - ->setProjectID($phabricator_project_id) 85 82 ->setTrunkBranch($trunk_branch) 86 83 ->setDetail('pushers', $pusher_phids) 87 84 ->setDetail('pick_failure_instructions', $pick_failure_instructions) ··· 173 170 ->setLabel(pht('Releeph Project PHID')) 174 171 ->setValue( 175 172 $this->getReleephProject()->getPHID())) 176 - ->appendChild( 177 - id(new AphrontFormSelectControl()) 178 - ->setLabel(pht('Phabricator Project')) 179 - ->setValue($phabricator_project_id) 180 - ->setName('projectID') 181 - ->setOptions($projects)) 182 173 ->appendChild( 183 174 id(new AphrontFormTextControl()) 184 175 ->setLabel(pht('Trunk'))
-8
src/applications/releeph/storage/ReleephProject.php
··· 22 22 protected $isActive; 23 23 protected $createdByUserPHID; 24 24 protected $arcanistProjectID; 25 - protected $projectID; 26 25 27 26 protected $details = array(); 28 27 ··· 74 73 if (!$this->getDetail('releaseCounter')) { 75 74 $this->setDetail('releaseCounter', 0); 76 75 } 77 - } 78 - 79 - public function loadPhabricatorProject() { 80 - if ($id = $this->getProjectID()) { 81 - return id(new PhabricatorProject())->load($id); 82 - } 83 - return id(new PhabricatorProject())->makeEphemeral(); // dummy 84 76 } 85 77 86 78 public function loadArcanistProject() {
+4
src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php
··· 1539 1539 'type' => 'sql', 1540 1540 'name' => $this->getPatchPath('20130731.releephrepoid.sql'), 1541 1541 ), 1542 + '20130731.releephproject.sql' => array( 1543 + 'type' => 'sql', 1544 + 'name' => $this->getPatchPath('20130731.releephproject.sql'), 1545 + ), 1542 1546 ); 1543 1547 } 1544 1548 }