Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/storage/PhabricatorRepository.php
Show First 20 Lines • Show All 1,191 Lines • ▼ Show 20 Lines | private function shouldSkipAllAutoclose() { | ||||
if ($this->isPublishingDisabled()) { | if ($this->isPublishingDisabled()) { | ||||
return self::BECAUSE_AUTOCLOSE_DISABLED; | return self::BECAUSE_AUTOCLOSE_DISABLED; | ||||
} | } | ||||
return null; | return null; | ||||
} | } | ||||
public function getAutocloseOnlyRules() { | public function getPermanentRefRules() { | ||||
return array_keys($this->getDetail('close-commits-filter', array())); | return array_keys($this->getDetail('close-commits-filter', array())); | ||||
} | } | ||||
public function setAutocloseOnlyRules(array $rules) { | public function setPermanentRefRules(array $rules) { | ||||
$rules = array_fill_keys($rules, true); | $rules = array_fill_keys($rules, true); | ||||
$this->setDetail('close-commits-filter', $rules); | $this->setDetail('close-commits-filter', $rules); | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getTrackOnlyRules() { | public function getTrackOnlyRules() { | ||||
return array_keys($this->getDetail('branch-filter', array())); | return array_keys($this->getDetail('branch-filter', array())); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,628 Lines • ▼ Show 20 Lines | return array( | ||||
pht( | pht( | ||||
'The "Fetch" and "Permanent Ref" rules for this repository.')), | 'The "Fetch" and "Permanent Ref" rules for this repository.')), | ||||
); | ); | ||||
} | } | ||||
public function getFieldValuesForConduit() { | public function getFieldValuesForConduit() { | ||||
$fetch_rules = $this->getFetchRules(); | $fetch_rules = $this->getFetchRules(); | ||||
$track_rules = $this->getTrackOnlyRules(); | $track_rules = $this->getTrackOnlyRules(); | ||||
$permanent_rules = $this->getAutocloseOnlyRules(); | $permanent_rules = $this->getPermanentRefRules(); | ||||
$fetch_rules = $this->getStringListForConduit($fetch_rules); | $fetch_rules = $this->getStringListForConduit($fetch_rules); | ||||
$track_rules = $this->getStringListForConduit($track_rules); | $track_rules = $this->getStringListForConduit($track_rules); | ||||
$permanent_rules = $this->getStringListForConduit($permanent_rules); | $permanent_rules = $this->getStringListForConduit($permanent_rules); | ||||
return array( | return array( | ||||
'name' => $this->getName(), | 'name' => $this->getName(), | ||||
'vcs' => $this->getVersionControlSystem(), | 'vcs' => $this->getVersionControlSystem(), | ||||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |