Closed aliculPix4D closed 8 months ago
@aliculPix4D I think we are almost there. I just left some comments on this apiEndpoint function.
@marco-m-pix4d @odormond ready for another round of review: https://github.com/Pix4D/cogito/pull/144/commits/f826246acc64f7f5b4775e000ca2b306d0f1d02a
source.github_hostname
to allow for overriding of the GitHub hostname only from the tests. This helps us avoid a very ugly implementation with:os.Getenv("COGITO_GITHUB_API")
. Default value is of course:github.com
github.com
from basically everywhereWe then later craft the API endpoint using:
func apiEndpoint(h string) string
function.No tests were added, at least not for now. I think everything is covered by the existing tests. I could add the unit test for
apiEndpoint
function actually.I will open a draft follow-up PR on top of this one, just to show you how simple will be to allow the GH Enterprise if this PR is merged.