3 final class PhabricatorRepositoryBranch
extends PhabricatorRepositoryDAO
{
5 protected $repositoryID;
9 protected function getConfiguration() {
11 self
::CONFIG_COLUMN_SCHEMA
=> array(
13 'lintCommit' => 'text40?',
15 self
::CONFIG_KEY_SCHEMA
=> array(
16 'repositoryID' => array(
17 'columns' => array('repositoryID', 'name'),
21 ) + parent
::getConfiguration();
24 public static function loadBranch($repository_id, $branch_name) {
25 return id(new PhabricatorRepositoryBranch())->loadOneWhere(
26 'repositoryID = %d AND name = %s',
31 public static function loadOrCreateBranch($repository_id, $branch_name) {
32 $branch = self
::loadBranch($repository_id, $branch_name);
37 return id(new PhabricatorRepositoryBranch())
38 ->setRepositoryID($repository_id)
39 ->setName($branch_name)