Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/storage/PhabricatorRepository.php
Show First 20 Lines • Show All 233 Lines • ▼ Show 20 Lines | public function setLocalPath($path) { | ||||
return parent::setLocalPath($path); | return parent::setLocalPath($path); | ||||
} | } | ||||
public function getDetail($key, $default = null) { | public function getDetail($key, $default = null) { | ||||
return idx($this->details, $key, $default); | return idx($this->details, $key, $default); | ||||
} | } | ||||
public function getHumanReadableDetail($key, $default = null) { | |||||
$value = $this->getDetail($key, $default); | |||||
switch ($key) { | |||||
case 'branch-filter': | |||||
$value = array_keys($value); | |||||
$value = implode(', ', $value); | |||||
break; | |||||
} | |||||
return $value; | |||||
} | |||||
public function setDetail($key, $value) { | public function setDetail($key, $value) { | ||||
$this->details[$key] = $value; | $this->details[$key] = $value; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function attachCommitCount($count) { | public function attachCommitCount($count) { | ||||
$this->commitCount = $count; | $this->commitCount = $count; | ||||
return $this; | return $this; | ||||
▲ Show 20 Lines • Show All 943 Lines • ▼ Show 20 Lines | /* -( Autoclose )---------------------------------------------------------- */ | ||||
} | } | ||||
public function setAutocloseOnlyRules(array $rules) { | public function setAutocloseOnlyRules(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() { | |||||
return array_keys($this->getDetail('branch-filter', array())); | |||||
} | |||||
public function setTrackOnlyRules(array $rules) { | |||||
$rules = array_fill_keys($rules, true); | |||||
$this->setDetail('branch-filter', $rules); | |||||
return $this; | |||||
} | |||||
/* -( Repository URI Management )------------------------------------------ */ | /* -( Repository URI Management )------------------------------------------ */ | ||||
/** | /** | ||||
* Get the remote URI for this repository. | * Get the remote URI for this repository. | ||||
* | * | ||||
* @return string | * @return string | ||||
▲ Show 20 Lines • Show All 1,608 Lines • Show Last 20 Lines |