Reduce similar code in GitlabProjects (based on Code Climate).