feat: add cherry-picking
This commit is contained in:
parent
e44bd91f10
commit
fba68b5d03
1 changed files with 10 additions and 0 deletions
|
@ -42,6 +42,7 @@ class TrackerController extends Controller
|
|||
$fromCheckin = $request->input('from', null);
|
||||
$toCheckin = $request->input('to', null);
|
||||
$forceDownload = $request->input('force', false);
|
||||
$cherryPickedCheckins = explode(',', $request->input('cherrypick', null));
|
||||
|
||||
try {
|
||||
$tripData = $this->get_trip_data($tripId, $forceDownload);
|
||||
|
@ -73,6 +74,15 @@ class TrackerController extends Controller
|
|||
);
|
||||
}
|
||||
|
||||
if ($cherryPickedCheckins) {
|
||||
$tripData->checkins = array_filter(
|
||||
$tripData->checkins,
|
||||
function ($checkin) use ($cherryPickedCheckins) {
|
||||
return in_array($checkin->id, $cherryPickedCheckins);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
return view(
|
||||
'tracker',
|
||||
[
|
||||
|
|
Loading…
Reference in a new issue