Differential D20465 Diff 48839 src/applications/repository/storage/PhabricatorRepositoryCommitData.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/storage/PhabricatorRepositoryCommitData.php
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | public function toDictionary() { | ||||
); | ); | ||||
} | } | ||||
public static function newFromDictionary(array $dict) { | public static function newFromDictionary(array $dict) { | ||||
return id(new PhabricatorRepositoryCommitData()) | return id(new PhabricatorRepositoryCommitData()) | ||||
->loadFromArray($dict); | ->loadFromArray($dict); | ||||
} | } | ||||
public function getPublisherHoldReasons() { | |||||
$holds = $this->getCommitDetail('holdReasons'); | |||||
// Look for the legacy "autocloseReason" if we don't have a modern list | |||||
// of hold reasons. | |||||
if (!$holds) { | |||||
$old_hold = $this->getCommitDetail('autocloseReason'); | |||||
if ($old_hold) { | |||||
$holds = array($old_hold); | |||||
} | |||||
} | |||||
if (!$holds) { | |||||
$holds = array(); | |||||
} | |||||
return $holds; | |||||
} | |||||
} | } |