3 final class PhabricatorRepositoryPublisherHoldReason
9 public static function newForHoldKey($key) {
10 $spec = self
::getSpecForHoldKey($key);
19 private static function getSpecForHoldKey($key) {
20 $specs = self
::getHoldReasonSpecs();
22 $spec = idx($specs, $key);
26 'name' => pht('Unknown Hold ("%s")', $key),
33 public function getName() {
34 return $this->getProperty('name');
37 public function getSummary() {
38 return $this->getProperty('summary');
41 private function getProperty($key, $default = null) {
42 return idx($this->spec
, $key, $default);
45 private static function getHoldReasonSpecs() {
47 PhabricatorRepositoryPublisher
::HOLD_IMPORTING
=> array(
48 'name' => pht('Repository Importing'),
49 'summary' => pht('This repository is still importing.'),
51 PhabricatorRepositoryPublisher
::HOLD_PUBLISHING_DISABLED
=> array(
52 'name' => pht('Publishing Disabled'),
53 'summary' => pht('All publishing is disabled for this repository.'),
55 PhabricatorRepositoryPublisher
::HOLD_NOT_REACHABLE_FROM_PERMANENT_REF
=>
57 'name' => pht('Not On Permanent Ref'),
59 'This commit is not an ancestor of any permanent ref.'),
61 PhabricatorRepositoryPublisher
::HOLD_REF_NOT_BRANCH
=> array(
62 'name' => pht('Not a Branch'),
63 'summary' => pht('This ref is not a branch.'),
65 PhabricatorRepositoryPublisher
::HOLD_UNTRACKED
=> array(
66 'name' => pht('Untracked Ref'),
67 'summary' => pht('This ref is configured as untracked.'),
69 PhabricatorRepositoryPublisher
::HOLD_NOT_PERMANENT_REF
=> array(
70 'name' => pht('Not a Permanent Ref'),
71 'summary' => pht('This ref is not configured as a permanent ref.'),