private void UpdateForProject(Project project) { if (lastStatuses.ContainsKey(project.Url) && lastCompletedStatuses.ContainsKey(project.Url)) { if (lastStatuses[project.Url].IsInProgress) { if (project.StatusValue == BuildStatusEnum.Successful) { if (BuildStatusUtils.IsErrorBuild(lastCompletedStatuses[project.Url])) { FixedProjects.Add(project); } else { SucceedingProjects.Add(project); } } else if (TreatAsFailure(project.Status)) { if (TreatAsFailure(lastCompletedStatuses[project.Url])) { StillFailingProjects.Add(project); } else { FailingProjects.Add(project); } } } } }
private bool ShouldOpenConsolePage(Project project) { if (project == null) { return(false); } BuildStatus status = project.Status; bool res = BuildStatusUtils.IsErrorBuild(status) || status.IsInProgress; return(res); }