Gitlab\Api\Repositories::protectBranch PHP Method

protectBranch() public method

public protectBranch ( integer $project_id, string $branch_name, boolean $devPush = false, boolean $devMerge = false ) : mixed
$project_id integer
$branch_name string
$devPush boolean
$devMerge boolean
return mixed
    public function protectBranch($project_id, $branch_name, $devPush = false, $devMerge = false)
    {
        return $this->put($this->getProjectPath($project_id, 'repository/branches/' . $this->encodeBranch($branch_name) . '/protect'), array('developers_can_push' => $devPush, 'developers_can_merge' => $devMerge));
    }