馃毀Improve GitHubClient setup and usage #19
Labels
high priority
High Priority
鉁╪ew feature
New feature that does not exist
preview
Done while in preview
Milestone
Complete The Item Below
Description
Improve the
GitHubClient
setup and usage throughout the project.Currently, the setup of the
GitHubClient
is not ideal when trying to make authorized GitHub API requests when running targets that use the GitHub API. To try and solve this issue, theLoadSecrestService
was created to load a token to be used for setting up theGitHubClient
for authorized requests. This needs to be put into use.Create a new service called
GitHubClientService
that is used to create aGitHubClient
object that is set up with a token for authorized requests. The newGitHubClientService
will inject and use theLoadSecretsService
to load the token from the disk.The
GitHubClientService
andLoadSecretsService
should also be set up with SimpleInjector so they can be easily consumed. TheGitHubClientService
should be set up in the IoC container as a singleton.The
GitHubClient
property will be areadonly
property that uses theGitHubClientService
every time it is requested. The service will lazy load/create the internal client object/field. Every subsequent request into the service will check if the field is null and if it is not, simply return a reference of the field.Acceptance Criteria
LoadSecretsService
changesSystem.IO.Abstractions
LoadSecretsService
classGitHubClientService
serviceGitHubClient
from aprivate static
field to aprivate
property with a getterGitHubClientService
service to get the clientLoadSecretsService
name refactored toSecretService
var
andparam
names to appropriate namesToDo Items
Issue Dependencies
No response
Related Work
No response
Additional Information:
Change Type Labels
馃悰bug
馃Жbreaking changes
鉁╪ew feature
workflow
馃棐锔廳ocumentation/code
馃摑documentation/product
Priority Type Labels
low priority
medium priority
high priority
Code of Conduct
The text was updated successfully, but these errors were encountered: