     %{body: raw, status_code: status_code} = HTTPoison.get!(
       "#{cfg[:site]}/repositories/#{repository_id}/branches/#{to}",
       [{"Authorization", "token #{token}"}, {"Accept", @content_type}])
-    cond do
+    %{body: _, status_code: 200} = cond do
       status_code == 404 ->
         HTTPoison.post!(
           "#{cfg[:site]}/repositories/#{repository_id}/refs",


  def synthesize_commit!(token, repository_id, branch, tree, parents, commit_message) when is_binary(token) do
    cfg = config()
    raw = HTTPoison.post!(
      "#{cfg[:site]}/repositories/#{repository_id}/git/commits",
      Poison.encode!(%{
        "parents": parents,

            "sha": sha
            }),
          [{"Authorization", "token #{token}"}, {"Accept", @content_type}])
      true -> %{body: "", status_code: 200}
    end
    sha
  end
