nixpkgs-github-update: slowness

This commit is contained in:
worldofpeace 2020-01-18 21:18:30 -05:00
parent 0a65c2b7e9
commit b85c3aea65

View File

@ -21,11 +21,11 @@ defmodule NixpkgsGitHubUpdate.GitHubLatestVersion do
end end
defp get_token do defp get_token do
String.to_charlist("#{System.get_env("OAUTH_TOKEN")}") System.get_env("OAUTH_TOKEN")
end end
defp put_token(headers, token) when is_list(token) do defp put_token(headers, token) when token != nil do
Map.put_new(headers, 'Authorization', 'token #{token}') Map.put_new(headers, 'Authorization', 'token #{String.to_charlist(token)}')
end end
defp put_token(headers, _), do: headers defp put_token(headers, _), do: headers