Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistMarkersWorkflow.php
<?php | <?php | ||||
abstract class ArcanistMarkersWorkflow | abstract class ArcanistMarkersWorkflow | ||||
extends ArcanistArcWorkflow { | extends ArcanistArcWorkflow { | ||||
abstract protected function getWorkflowMarkerType(); | abstract protected function getWorkflowMarkerType(); | ||||
public function runWorkflow() { | public function runWorkflow() { | ||||
$api = $this->getRepositoryAPI(); | $api = $this->getRepositoryAPI(); | ||||
$marker_type = $this->getWorkflowMarkerType(); | $marker_type = $this->getWorkflowMarkerType(); | ||||
$markers = $api->newMarkerRefQuery() | $markers = $api->newMarkerRefQuery() | ||||
->withTypes(array($marker_type)) | ->withMarkerTypes(array($marker_type)) | ||||
->execute(); | ->execute(); | ||||
$states = array(); | $states = array(); | ||||
foreach ($markers as $marker) { | foreach ($markers as $marker) { | ||||
$state_ref = id(new ArcanistWorkingCopyStateRef()) | $state_ref = id(new ArcanistWorkingCopyStateRef()) | ||||
->setCommitRef($marker->getCommitRef()); | ->setCommitRef($marker->getCommitRef()); | ||||
$states[] = array( | $states[] = array( | ||||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |