mirror of
https://we.phorge.it/source/phorge.git
synced 2025-04-11 11:58:33 +02: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())
|
if ($build_objects) {
|
||||||
->setViewer(PhabricatorUser::getOmnipotentUser())
|
$buildables = id(new HarbormasterBuildableQuery())
|
||||||
->withBuildablePHIDs($build_objects)
|
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||||||
->withManualBuildables(false)
|
->withBuildablePHIDs($build_objects)
|
||||||
->execute();
|
->withManualBuildables(false)
|
||||||
$buildable_phids = mpull($buildables, 'getPHID');
|
->execute();
|
||||||
|
$buildable_phids = mpull($buildables, 'getPHID');
|
||||||
|
|
||||||
if (!$buildable_phids) {
|
if ($buildable_phids) {
|
||||||
return array();
|
$builds = id(new HarbormasterBuildQuery())
|
||||||
}
|
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||||||
|
->withBuildablePHIDs($buildable_phids)
|
||||||
|
->withBuildPlanPHIDs(array($plan->getPHID()))
|
||||||
|
->execute();
|
||||||
|
|
||||||
$builds = id(new HarbormasterBuildQuery())
|
foreach ($builds as $build) {
|
||||||
->setViewer(PhabricatorUser::getOmnipotentUser())
|
if (!$build->isComplete()) {
|
||||||
->withBuildablePHIDs($buildable_phids)
|
$blockers[] = pht('Build %d', $build->getID());
|
||||||
->withBuildPlanPHIDs(array($plan->getPHID()))
|
}
|
||||||
->execute();
|
}
|
||||||
|
|
||||||
foreach ($builds as $build) {
|
|
||||||
if (!$build->isComplete()) {
|
|
||||||
$blockers[] = pht('Build %d', $build->getID());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue