private static string GetUserFilter(ProjectGitlabData data, ProjectUserFilterMapping[] projectUserMappings) { var projectUserFilter = projectUserMappings.SingleOrDefault(x => x.ProjectId == data.Id); if (projectUserFilter == null) { return(null); } return(projectUserFilter.UserFilter); }
private static string GetUrl(ProjectGitlabData x, ProjectUrlReplacer[] urlReplacers) { var url = x.Url; foreach (var urlReplacer in urlReplacers) { url = url.Replace(urlReplacer.Pattern, urlReplacer.Target); } return(url); }
private static string GetDepartment(ProjectGitlabData projectData, DepartmentMappings[] departmentMappings) { foreach (var mapping in departmentMappings) { if (projectData.Path.Contains(mapping.PathContains)) { return(mapping.TargetDepartment); } } return("other"); }