Gitlab\Model\Branch::unprotect PHP Method

unprotect() public method

public unprotect ( ) : Branch
return Branch
    public function unprotect()
    {
        $data = $this->api('repositories')->unprotectBranch($this->project->id, $this->name);
        return static::fromArray($this->getClient(), $this->project, $data);
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * @param string $branch_name
  * @return Branch
  */
 public function unprotectBranch($branch_name)
 {
     $branch = new Branch($this, $branch_name);
     $branch->setClient($this->getClient());
     return $branch->unprotect();
 }