Incoming request URLs to the bake route will be normalized. This way, we prevent duplicate entries from dropping in (like with https://github.com/open-sauced/pizza/ and https://github.com/open-sauced/pizza
Validates that the repo URL is actually a git repo. This is accomplished by essentially calling git ls-remote on the provided URL which is more efficient than doing a shallow clone.
I also cleaned up where repoURL was getting called in the processRepository function
Description
This patch is twofold:
https://github.com/open-sauced/pizza/
andhttps://github.com/open-sauced/pizza
git ls-remote
on the provided URL which is more efficient than doing a shallow clone.I also cleaned up where
repoURL
was getting called in theprocessRepository
functionExample:
On calling my local repo with:
it works and correctly validates/normalizes the url. Here are the debug logs from the server 👍🏼
In the case that if fails, this should now return the invalid request back down to the client:
(I thought the auth error was maybe a bug in go-git, but interestingly, this is the same behavior as
git ls-remote
and is working as expected).What type of PR is this? (check all applicable)
Related Tickets & Documents
Closes #29 cc @k1nho
Mobile & Desktop Screenshots/Recordings
N/a
Added tests?
Added to documentation?
[optional] Are there any post-deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?