mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 23:02:42 +01:00
Fix some logic in WaitForPreviousBuildStep
Summary: Fixes T5062. See inlines. Test Plan: Did not test whatsoever. Reviewers: hach-que Reviewed By: hach-que Subscribers: epriestley Maniphest Tasks: T5062 Differential Revision: https://secure.phabricator.com/D9132
This commit is contained in:
parent
f2c0e94ea8
commit
702f073f0a
1 changed files with 18 additions and 18 deletions
|
@ -73,26 +73,26 @@ final class HarbormasterWaitForPreviousBuildStepImplementation
|
|||
}
|
||||
}
|
||||
|
||||
$buildables = id(new HarbormasterBuildableQuery())
|
||||
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||||
->withBuildablePHIDs($build_objects)
|
||||
->withManualBuildables(false)
|
||||
->execute();
|
||||
$buildable_phids = mpull($buildables, 'getPHID');
|
||||
if ($build_objects) {
|
||||
$buildables = id(new HarbormasterBuildableQuery())
|
||||
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||||
->withBuildablePHIDs($build_objects)
|
||||
->withManualBuildables(false)
|
||||
->execute();
|
||||
$buildable_phids = mpull($buildables, 'getPHID');
|
||||
|
||||
if (!$buildable_phids) {
|
||||
return array();
|
||||
}
|
||||
if ($buildable_phids) {
|
||||
$builds = id(new HarbormasterBuildQuery())
|
||||
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||||
->withBuildablePHIDs($buildable_phids)
|
||||
->withBuildPlanPHIDs(array($plan->getPHID()))
|
||||
->execute();
|
||||
|
||||
$builds = id(new HarbormasterBuildQuery())
|
||||
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||||
->withBuildablePHIDs($buildable_phids)
|
||||
->withBuildPlanPHIDs(array($plan->getPHID()))
|
||||
->execute();
|
||||
|
||||
foreach ($builds as $build) {
|
||||
if (!$build->isComplete()) {
|
||||
$blockers[] = pht('Build %d', $build->getID());
|
||||
foreach ($builds as $build) {
|
||||
if (!$build->isComplete()) {
|
||||
$blockers[] = pht('Build %d', $build->getID());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue