+require IEx
 defmodule TrackerBot.Management do
   @moduledoc """
   Management related logic
   """
 
-  alias TrackerBot.{Pivotal, Reporting}
+  alias TrackerBot.{Pivotal, Reporting, Labeling}
 
   @omitted_states ~w(unstarted accepted unscheduled)
   @ttl 32 # hours

    project_id
    |> Pivotal.list_people
    |> Enum.map(&(assign_stories(&1, stories)))
    |> Reporting.report
  end

  def report(project_name) do

  end

  defp owner?(%{"owner_ids" => owner_ids}, id), do: id in owner_ids

  defp find_label(%{stories: [%{"labels" => labels} | _]}), do: Labeling.get_label(labels)
  defp find_label(_), do: Labeling.get_label([])
end
