Fixing some issues with project default branches, adding tests for that too
This commit is contained in:
parent
2bff0270cf
commit
cb53ec9c6d
6 changed files with 111 additions and 9 deletions
|
|
@ -58,4 +58,18 @@ class Project extends ProjectBase
|
|||
|
||||
return $rtn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of Branch / branch.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBranch()
|
||||
{
|
||||
if (empty($this->data['branch'])) {
|
||||
return $this->getType() === 'hg' ? 'default' : 'master';
|
||||
} else {
|
||||
return $this->data['branch'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue