   defstruct [
     config: [],
     repo: nil,
+    bot_name: nil,
     merge_requests: %{},
     worker: nil
   ]

  alias Gullintanni.Comment
  alias Gullintanni.Repo
  alias Gullintanni.Worker
  require Logger

  @typedoc "The pipeline type"
  @type t ::
    %Pipeline{
      config: Config.t,
      repo: Repo.t,
      merge_requests: map,
      worker: Worker.t
    }

    end
  end

  @spec from_config(Config.t) :: t
  defp from_config(config) do
    repo = Repo.new(config[:repo_provider], config[:repo_owner], config[:repo_name])
    bot_name = repo.provider.whoami(config)
    reqs =
      repo.provider.download_merge_requests(repo, config)
      |> Map.new(fn req -> {req.id, req} end)

    %Pipeline{
      config: config,
      repo: repo,
      bot_name: bot_name,
      merge_requests: reqs,
      worker: config[:worker]
    }
  end

  @spec handle_comment(Comment.t, Repo.t) :: :ok
