Fix encoding error for commits endpoint
Contributes to https://gitlab.com/gitlab-org/gitlab/-/issues/407848 **Problem** We started displaying tags on commits page. However, tags with UTF-8 characters raise an exception, because we don't encode them correctly. **Solution** Use 'Git#ref_name' to convert tag name to UTF-8 format. Changelog: fixed