Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15196772
D7546.id17026.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D7546.id17026.diff
View Options
Index: src/applications/harbormaster/controller/HarbormasterBuildableEditController.php
===================================================================
--- src/applications/harbormaster/controller/HarbormasterBuildableEditController.php
+++ src/applications/harbormaster/controller/HarbormasterBuildableEditController.php
@@ -42,8 +42,11 @@
->executeOne();
if ($object instanceof DifferentialRevision) {
- throw new Exception(
- "TODO: We need to assign PHIDs to diffs before this will work.");
+ $revision = $object;
+ $object = $object->loadActiveDiff();
+ $buildable
+ ->setBuildablePHID($object->getPHID())
+ ->setContainerPHID($revision->getPHID());
} else if ($object instanceof PhabricatorRepositoryCommit) {
$buildable
->setBuildablePHID($object->getPHID())
Index: src/applications/harbormaster/controller/HarbormasterPlanEditController.php
===================================================================
--- src/applications/harbormaster/controller/HarbormasterPlanEditController.php
+++ src/applications/harbormaster/controller/HarbormasterPlanEditController.php
@@ -68,7 +68,7 @@
$id = $plan->getID();
$title = pht('Edit Build Plan');
- $cancel_uri = "/B{$id}";
+ $cancel_uri = $this->getApplicationURI('plan/'.$plan->getID().'/');
$save_button = pht('Save Build Plan');
}
Index: src/applications/harbormaster/step/VariableBuildStepImplementation.php
===================================================================
--- src/applications/harbormaster/step/VariableBuildStepImplementation.php
+++ src/applications/harbormaster/step/VariableBuildStepImplementation.php
@@ -4,6 +4,7 @@
public function retrieveVariablesFromBuild(HarbormasterBuild $build) {
$results = array(
+ 'buildable.diff' => null,
'buildable.revision' => null,
'buildable.commit' => null,
'repository.callsign' => null,
@@ -17,6 +18,7 @@
$repo = null;
if ($object instanceof DifferentialDiff) {
+ $results['buildable.diff'] = $object->getID();
$revision = $object->getRevision();
$results['buildable.revision'] = $revision->getID();
$repo = $revision->getRepository();
@@ -47,6 +49,8 @@
public function getAvailableVariables() {
return array(
+ 'buildable.diff' =>
+ pht('The differential diff ID, if applicable.'),
'buildable.revision' =>
pht('The differential revision ID, if applicable.'),
'buildable.commit' => pht('The commit identifier, if applicable.'),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 23, 7:13 PM (10 h, 12 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7187494
Default Alt Text
D7546.id17026.diff (2 KB)
Attached To
Mode
D7546: Allow users to create buildables from diffs
Attached
Detach File
Event Timeline
Log In to Comment