3
0
Fork 0
forked from mirrors/nixpkgs

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
defp get_token do
String.to_charlist("#{System.get_env("OAUTH_TOKEN")}")
System.get_env("OAUTH_TOKEN")
end
defp put_token(headers, token) when is_list(token) do
Map.put_new(headers, 'Authorization', 'token #{token}')
defp put_token(headers, token) when token != nil do
Map.put_new(headers, 'Authorization', 'token #{String.to_charlist(token)}')
end
defp put_token(headers, _), do: headers