🚧Fix GitHub token service issue #33
Labels
🧨breaking changes
Feature/changes contains breaking changes
🐛bug
Something isn't working
high priority
High Priority
✨new feature
New feature that does not exist
preview
Done while in preview
Milestone
Complete The Item Below
Description
Currently the
GitHubTokenService
is not working correctly. The token service uses theSecretService
to load the GitHub token locally from disk when running locally. The issue is that theSecretService
is looking in the wrong location.How it is supposed to work:
It is supposed to look inside of the .github folder in the root of the repository. If the folder directory path exists, it should check for the
local-secrets.json
file and load the token from the file.How it currently working:
It uses the .github folder as part of the path, but the section before the .github folder in the path is incorrect. It is building the beginning section of the path based on the execution path of the assembly. This is how it was originally designed, but the ⚽ was dropped and somebody forgot to update the service. (That somebody was "me". 😁
How To Fix It:
Instead of using the executable assembly, use the
Directory.GetCurrentDirectory()
instead to build the path section before the .github folder. This represents the root of the repository. TheSecretService
uses theICurrentDirService
to be able to get the executing assembly. This is only used in theSecretService
class. Just delete theICurrentDirService
interface andCurrentDirService
class entirely. It is not needed anymore.Acceptance Criteria
SecretService
to build the path correctly.SecretService
unit tests updatedICurrentDireService
interface deletedCurrentDireService
class deletedToDo Items
Issue Dependencies
No response
Related Work
No response
Additional Information:
Change Type Labels
🐛bug
🧨breaking changes
✨new feature
workflow
🗒️documentation/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: