Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/herald/HeraldPreCommitAdapter.php
Show All 19 Lines | abstract class HeraldPreCommitAdapter extends HeraldAdapter { | ||||
public function getHookEngine() { | public function getHookEngine() { | ||||
return $this->hookEngine; | return $this->hookEngine; | ||||
} | } | ||||
public function getAdapterApplicationClass() { | public function getAdapterApplicationClass() { | ||||
return 'PhabricatorDiffusionApplication'; | return 'PhabricatorDiffusionApplication'; | ||||
} | } | ||||
public function isTestAdapterForObject($object) { | |||||
return ($object instanceof PhabricatorRepositoryCommit); | |||||
} | |||||
public function canCreateTestAdapterForObject($object) { | |||||
return false; | |||||
} | |||||
public function getAdapterTestDescription() { | |||||
return pht( | |||||
'Commit hook events depend on repository state which is only available '. | |||||
'at push time, and can not be run in test mode.'); | |||||
} | |||||
protected function initializeNewAdapter() { | protected function initializeNewAdapter() { | ||||
$this->log = new PhabricatorRepositoryPushLog(); | $this->log = new PhabricatorRepositoryPushLog(); | ||||
} | } | ||||
public function isSingleEventAdapter() { | public function isSingleEventAdapter() { | ||||
return true; | return true; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |