Page MenuHomePhabricator

D13812.id33355.diff
No OneTemporary

D13812.id33355.diff

diff --git a/src/applications/harbormaster/storage/build/HarbormasterBuild.php b/src/applications/harbormaster/storage/build/HarbormasterBuild.php
--- a/src/applications/harbormaster/storage/build/HarbormasterBuild.php
+++ b/src/applications/harbormaster/storage/build/HarbormasterBuild.php
@@ -214,6 +214,10 @@
$this->getBuildStatus() === self::STATUS_BUILDING;
}
+ public function isAutobuild() {
+ return ($this->getPlanAutoKey() !== null);
+ }
+
public function createLog(
HarbormasterBuildTarget $build_target,
$log_source,
@@ -336,16 +340,28 @@
}
public function canRestartBuild() {
+ if ($this->isAutobuild()) {
+ return false;
+ }
+
return !$this->isRestarting();
}
public function canStopBuild() {
+ if ($this->isAutobuild()) {
+ return false;
+ }
+
return !$this->isComplete() &&
!$this->isStopped() &&
!$this->isStopping();
}
public function canResumeBuild() {
+ if ($this->isAutobuild()) {
+ return false;
+ }
+
return $this->isStopped() &&
!$this->isResuming();
}

File Metadata

Mime Type
text/plain
Expires
Mon, Mar 24, 9:51 AM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7225584
Default Alt Text
D13812.id33355.diff (1 KB)

Event Timeline