Do not fail when cleaning up MR with no repository
When we clean up refs of a merge request that is on a project with no repository anymore, the MergeRequests::CleanupRefsService will fail. Before this fix, it'll throw an error and retry and will not set the cleanup schedule as completed. When the cleanup schedule is not marked as completed, it'll be picked up by the scheduler again. To fix that, we are now checking if the repository exists before deleting refs. This way, we can still update the cleanup schedule.
Showing
Please register or sign in to comment