Add getGerritFrontEndUrlFor(event) then refactor related codes.