mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
add GitHub config env vars
This commit is contained in:
parent
6505d203c6
commit
8b773c9639
4 changed files with 7 additions and 3 deletions
4
.env
4
.env
|
|
@ -3,4 +3,6 @@ FILTERLISTS_MYSQL_ROOT_PASSWORD=filterlists
|
|||
FILTERLISTS_MYSQL_DATABASE=filterlists
|
||||
FILTERLISTS_MYSQL_USER=filterlists
|
||||
FILTERLISTS_MYSQL_PASSWORD=filterlists
|
||||
FILTERLISTS_AGENT_APPLICATION_INSIGHTS_INSTRUMENTATION_KEY=
|
||||
FILTERLISTS_AGENT_APPLICATION_INSIGHTS_INSTRUMENTATION_KEY=
|
||||
FILTERLISTS_AGENT_GITHUB_PRODUCT_HEADER_VALUE=
|
||||
FILTERLISTS_AGENT_GITHUB_PERSONAL_ACCESS_TOKEN=
|
||||
|
|
@ -66,6 +66,8 @@ services:
|
|||
- archives:/app/archives
|
||||
environment:
|
||||
ApplicationInsights__InstrumentationKey: ${FILTERLISTS_AGENT_APPLICATION_INSIGHTS_INSTRUMENTATION_KEY}
|
||||
GitHub__ProductHeaderValue: ${FILTERLISTS_AGENT_GITHUB_PRODUCT_HEADER_VALUE}
|
||||
GitHub__PersonalAccessToken: ${FILTERLISTS_AGENT_GITHUB_PERSONAL_ACCESS_TOKEN}
|
||||
|
||||
networks:
|
||||
reverse-proxy:
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@
|
|||
public class GitHub
|
||||
{
|
||||
public string ProductHeaderValue { get; set; }
|
||||
public string OauthToken { get; set; }
|
||||
public string PersonalAccessToken { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -56,7 +56,7 @@ private static void AddGitHubClient(this IServiceCollection services)
|
|||
var gitHubConfig = s.GetService<IOptions<GitHub>>();
|
||||
return new GitHubClient(new ProductHeaderValue(gitHubConfig.Value.ProductHeaderValue))
|
||||
{
|
||||
Credentials = new Credentials(gitHubConfig.Value.OauthToken)
|
||||
Credentials = new Credentials(gitHubConfig.Value.PersonalAccessToken)
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue