File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ if config_env() == :prod do
1515 session_signing_salt: System . fetch_env! ( "HEXDOCS_SESSION_SIGNING_SALT" ) ,
1616 session_encryption_salt: System . fetch_env! ( "HEXDOCS_SESSION_ENCRYPTION_SALT" ) ,
1717 queue_concurrency: String . to_integer ( System . fetch_env! ( "HEXDOCS_QUEUE_CONCURRENCY" ) ) ,
18+ github_user: System . fetch_env! ( "HEXDOCS_GITHUB_USER" ) ,
19+ github_token: System . fetch_env! ( "HEXDOCS_GITHUB_TOKEN" ) ,
1820 host: System . fetch_env! ( "HEXDOCS_HOST" )
1921
2022 config :hexdocs , :repo_bucket , name: System . fetch_env! ( "HEXDOCS_REPO_BUCKET" )
Original file line number Diff line number Diff line change @@ -4,14 +4,17 @@ defmodule Hexdocs.SourceRepo.GitHub do
44
55 @ impl true
66 def versions ( repo ) do
7+ user = Application . get_env ( :hexdocs , :github_user )
8+ token = Application . get_env ( :hexdocs , :github_token )
79 url = @ github_url <> "/repos/#{ repo } /tags"
810
911 headers = [
1012 accept: "application/json"
1113 ]
1214
1315 options = [
14- :with_body
16+ :with_body ,
17+ basic_auth: { user , token }
1518 ]
1619
1720 Hexdocs.HTTP . retry ( "github" , url , fn ->
You can’t perform that action at this time.
0 commit comments