summaryrefslogtreecommitdiff
path: root/app/helpers/branches_helper.rb
blob: 60c19e6fecd19f66891f21273658de773d60e33a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

module BranchesHelper
  def project_branches
    options_for_select(@project.repository.branch_names, @project.default_branch)
  end

  def protected_branch?(project, branch)
    ProtectedBranch.protected?(project, branch.name)
  end
end

BranchesHelper.prepend_if_ee('EE::BranchesHelper')