Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/storage/PhabricatorRepository.php
| Show First 20 Lines • Show All 1,042 Lines • ▼ Show 20 Lines | /* -( Local Command Execution )-------------------------------------------- */ | ||||
| * We do not publish information about repositories during initial import, | * We do not publish information about repositories during initial import, | ||||
| * or if the repository has been set not to publish. | * or if the repository has been set not to publish. | ||||
| */ | */ | ||||
| public function shouldPublish() { | public function shouldPublish() { | ||||
| if ($this->isImporting()) { | if ($this->isImporting()) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| if ($this->getDetail('herald-disabled')) { | if ($this->isPublishingDisabled()) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| return true; | return true; | ||||
| } | } | ||||
| public function isPublishingDisabled() { | |||||
| return $this->getDetail('herald-disabled'); | |||||
| } | |||||
| public function shouldPublishCommit(PhabricatorRepositoryCommit $commit) { | public function shouldPublishCommit(PhabricatorRepositoryCommit $commit) { | ||||
| if (!$this->shouldPublish()) { | if (!$this->shouldPublish()) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| if (!$commit->isPermanentCommit()) { | if (!$commit->isPermanentCommit()) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 115 Lines • ▼ Show 20 Lines | /* -( Autoclose )---------------------------------------------------------- */ | ||||
| * repository level. | * repository level. | ||||
| * @task autoclose | * @task autoclose | ||||
| */ | */ | ||||
| private function shouldSkipAllAutoclose() { | private function shouldSkipAllAutoclose() { | ||||
| if ($this->isImporting()) { | if ($this->isImporting()) { | ||||
| return self::BECAUSE_REPOSITORY_IMPORTING; | return self::BECAUSE_REPOSITORY_IMPORTING; | ||||
| } | } | ||||
| if ($this->getDetail('disable-autoclose', false)) { | if ($this->isPublishingDisabled()) { | ||||
| return self::BECAUSE_AUTOCLOSE_DISABLED; | return self::BECAUSE_AUTOCLOSE_DISABLED; | ||||
| } | } | ||||
| return null; | return null; | ||||
| } | } | ||||
| public function getAutocloseOnlyRules() { | public function getAutocloseOnlyRules() { | ||||
| return array_keys($this->getDetail('close-commits-filter', array())); | return array_keys($this->getDetail('close-commits-filter', array())); | ||||
| ▲ Show 20 Lines • Show All 1,673 Lines • Show Last 20 Lines | |||||