Extend HasRepository#default_branch method to return `main` by default
Follow-up to https://gitlab.com/gitlab-org/gitlab/-/merge_requests/60258#note_563592962 discussion. Let's try and move the logic from this method to https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/models/concerns/has_repository.rb#L74 concern and fix the tests. Other classes that include `HasRepository` (like snippets, wikis...) will benefit from this refactor as well
issue