preslavmihaylov/todocheck

Validation for existing github repository always fails if the repository is private

Opened this issue · 3 comments

In #70, a new validation was added which first checks that a repository exists before proceeding with the rest of the application.

For private github repositories, this always fails because the apitoken is not acquired before making the validation.
What's more, the API token is not added as an authorisation middleware when checking that the repository exists.

What to do about it:

  • Acquire Authentication token before making any validations
  • Instrument calls to IsHealthy in fetcher to plug in the authorisation middleware

This issue also makes this warning:
image

always visible as it checks for the existence of the token, without acquiring it first

No need to create a new release after this is fixed as these changes are done after the latest release (#68)

I've mitigated this incident, but I had to remove the #70 validation. In a follow-up PR, I will introduce it again.