Differential D12390 Diff 31157 src/applications/releeph/conduit/work/ReleephWorkNextRequestConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/releeph/conduit/work/ReleephWorkNextRequestConduitAPIMethod.php
Show First 20 Lines • Show All 171 Lines • ▼ Show 20 Lines | protected function execute(ConduitAPIRequest $request) { | ||||
); | ); | ||||
} | } | ||||
private function sortPicks(array $releeph_requests) { | private function sortPicks(array $releeph_requests) { | ||||
$surrogate = array(); | $surrogate = array(); | ||||
foreach ($releeph_requests as $rq) { | foreach ($releeph_requests as $rq) { | ||||
// TODO: it's likely that relying on the `id` column to provide | // TODO: it's likely that relying on the `id` column to provide | ||||
// trunk-commit-order is thoroughly broken. | // trunk-commit-order is thoroughly broken. | ||||
$ordinal = (int) $rq->loadPhabricatorRepositoryCommit()->getID(); | $ordinal = (int)$rq->loadPhabricatorRepositoryCommit()->getID(); | ||||
$surrogate[$ordinal] = $rq; | $surrogate[$ordinal] = $rq; | ||||
} | } | ||||
ksort($surrogate); | ksort($surrogate); | ||||
return $surrogate; | return $surrogate; | ||||
} | } | ||||
/** | /** | ||||
* Sort an array of ReleephRequests, that have been picked into a branch, in | * Sort an array of ReleephRequests, that have been picked into a branch, in | ||||
Show All 40 Lines |