public function protect($devPush = false, $devMerge = false) { $data = $this->api('repositories')->protectBranch($this->project->id, $this->name, $devPush, $devMerge); return static::fromArray($this->getClient(), $this->project, $data); }
/** * @param string $branch_name * @return Branch */ public function protectBranch($branch_name) { $branch = new Branch($this, $branch_name); $branch->setClient($this->getClient()); return $branch->protect(); }