Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15333764
D18154.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D18154.diff
View Options
diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php
--- a/src/applications/differential/controller/DifferentialRevisionViewController.php
+++ b/src/applications/differential/controller/DifferentialRevisionViewController.php
@@ -615,6 +615,29 @@
$curtain->addAction($relationship_submenu);
}
+ $repository = $revision->getRepository();
+ if ($repository && $repository->canPerformAutomation()) {
+ $revision_id = $revision->getID();
+
+ $op = new DrydockLandRepositoryOperation();
+ $barrier = $op->getBarrierToLanding($viewer, $revision);
+
+ if ($barrier) {
+ $can_land = false;
+ } else {
+ $can_land = true;
+ }
+
+ $action = id(new PhabricatorActionView())
+ ->setName(pht('Land Revision'))
+ ->setIcon('fa-fighter-jet')
+ ->setHref("/differential/revision/operation/{$revision_id}/")
+ ->setWorkflow(true)
+ ->setDisabled(!$can_land);
+
+ $curtain->addAction($action);
+ }
+
return $curtain;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 9, 4:40 AM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7386572
Default Alt Text
D18154.diff (1 KB)
Attached To
Mode
D18154: Restore "Land Revision" action to UI
Attached
Detach File
Event Timeline
Log In to Comment