Method: LabClient::ProtectedBranches#list

Defined in:
lib/labclient/protected_branches/list.rb

#list(project_id, search = nil) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/labclient/protected_branches/list.rb', line 23

def list(project_id, search = nil)
  query = if search.nil?
            nil
          else
            { search: search }
          end

  project_id = format_id(project_id)

  client.request(:get, "projects/#{project_id}/protected_branches", klass: Branch, body: query)
end