Sometimes, a build might be triggered before the repository is registered, which mean a deployment key was added. For these reason we have a retry logic here https://github.com/taubyte/tau/services/monkey/job.go#L88. Frankly, this code does not look good.
Closes #152
Sometimes, a build might be triggered before the repository is registered, which mean a deployment key was added. For these reason we have a retry logic here https://github.com/taubyte/tau/services/monkey/job.go#L88. Frankly, this code does not look good.
I suggest moving the check for deployment key to https://github.com/taubyte/tau/services/monkey/job.go#L41, and use a helper function that will retry for a number of times till we get repo with a deployment key.
Add a reusable Retry helper function.